$Log$
+ Revision 625.22 2004/09/15 03:02:47 ajc
+ * Add an SMTP MSA listener (separate port, requires auth)
+
Revision 625.21 2004/09/13 15:51:59 ajc
* newinstall.sh: updated from the working version at easyinstall.citadel.org
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
/*
* Text description of this software
*/
-#define CITADEL "Citadel 6.25"
+#define CITADEL "Citadel 6.26"
/*
* REV_LEVEL is the current version number (multiplied by 100 to avoid having
* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 625 /* This version */
+#define REV_LEVEL 626 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
-#define EXPORT_REV_MIN 623 /* Oldest compatible export files */
+#define EXPORT_REV_MIN 626 /* Oldest compatible export files */
#define SERVER_TYPE 0 /* zero for stock Citadel; other developers please
obtain SERVER_TYPE codes for your implementations */
char c_ldap_base_dn[256]; /* LDAP base DN */
char c_ldap_bind_dn[256]; /* LDAP bind DN */
char c_ldap_bind_pw[256]; /* LDAP bind password */
+ int c_msa_port; /* SMTP MSA listener port (usu 587) */
};
/*
cprintf("\n");
#endif
cprintf("%s\n", config.c_ip_addr);
+ cprintf("%d\n", config.c_msa_port);
cprintf("000\n");
}
case 37:
safestrncpy(config.c_ip_addr, buf,
sizeof config.c_ip_addr);
+ case 38:
+ config.c_msa_port = atoi(buf);
+ break;
}
++a;
}
void do_system_configuration(CtdlIPC *ipc)
{
-#define NUM_CONFIGS 38
+#define NUM_CONFIGS 39
char buf[SIZ];
char sc[NUM_CONFIGS][SIZ];
strprompt("Server IP address (0.0.0.0 for 'any')", &sc[37][0], 15);
strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
strprompt("IMAP server port (-1 to disable)", &sc[27][0], 5);
- strprompt("SMTP server port (-1 to disable)", &sc[24][0], 5);
+ strprompt("SMTP MTA server port (-1 to disable)", &sc[24][0], 5);
+ strprompt("SMTP MSA server port (-1 to disable)", &sc[38][0], 5);
/* This logic flips the question around, because it's one of those
* situations where 0=yes and 1=no
int delivery_mode;
int message_originated_locally;
int is_lmtp;
+ int is_msa;
};
enum { /* Command states for login authentication */
cprintf("220 %s ESMTP Citadel server ready.\r\n", config.c_fqdn);
}
+/*
+ * SMTP MSA port requires authentication.
+ */
+void smtp_msa_greeting(void) {
+ smtp_greeting();
+ SMTP->is_msa = 1;
+}
+
+
/*
* LMTP is like SMTP but with some extra bonus footage added.
*/
return;
}
+ if ( (SMTP->is_msa) && (!CC->logged_in) ) {
+ cprintf("550 5.1.8 "
+ "You must log in to send mail on this port.\r\n");
+ strcpy(SMTP->from, "");
+ return;
+ }
+
strcpy(recp, &argbuf[3]);
striplt(recp);
stripallbut(recp, '<', '>');
char *serv_smtp_init(void)
{
- CtdlRegisterServiceHook(config.c_smtp_port, /* On the net... */
+ CtdlRegisterServiceHook(config.c_smtp_port, /* SMTP MTA */
NULL,
smtp_greeting,
smtp_command_loop,
NULL);
- CtdlRegisterServiceHook(0, /* ...and locally */
+ CtdlRegisterServiceHook(config.c_msa_port, /* SMTP MSA */
+ NULL,
+ smtp_msa_greeting,
+ smtp_command_loop,
+ NULL);
+
+ CtdlRegisterServiceHook(0, /* local LMTP */
"lmtp.socket",
lmtp_greeting,
smtp_command_loop,
cprintf("%s\n", config.c_ldap_bind_dn);
cprintf("%s\n", config.c_ldap_bind_pw);
cprintf("%s\n", config.c_ip_addr);
+ cprintf("%d\n", config.c_msa_port);
/* Export the control file */
get_control();
client_gets(config.c_ldap_bind_dn);
client_gets(config.c_ldap_bind_pw);
client_gets(config.c_ip_addr);
+ client_gets(buf); config.c_msa_port = atoi(buf);
put_config();
lprintf(CTDL_INFO, "Imported config file\n");
}
if (config.c_smtp_port == 0) config.c_smtp_port = 25;
if (config.c_pop3_port == 0) config.c_pop3_port = 110;
if (config.c_imap_port == 0) config.c_imap_port = 143;
+ if (config.c_msa_port == 0) config.c_msa_port = 587;
/* Go through a series of dialogs prompting for config info */
if (setup_type != UI_SILENT) {