Aggregation of remote POP3 accounts is now working.
[citadel.git] / citadel / modules / smtp / serv_smtp.c
index ccbe1a78ef3a9c7795d8fa0417958626d3168f34..df9b3d632eea8e49cd6bb035c90ac76367dad85b 100644 (file)
@@ -166,6 +166,7 @@ void smtp_greeting(int is_msa)
  */
 void smtps_greeting(void) {
        CtdlModuleStartCryptoMsgs(NULL, NULL, NULL);
+       if (!CC->redirect_ssl) CC->kill_me = 1;         /* kill session if no crypto */
        smtp_greeting(0);
 }
 
@@ -672,7 +673,7 @@ void smtp_data(void) {
                        config.c_fqdn,
                        nowstamp);
        
-       body = CtdlReadMessageBody(".", config.c_maxmsglen, body, 1);
+       body = CtdlReadMessageBody(".", config.c_maxmsglen, body, 1, 0);
        if (body == NULL) {
                cprintf("550 5.6.5 "
                        "Unable to save message: internal error.\r\n");
@@ -1803,7 +1804,11 @@ void smtp_cleanup_function(void) {
 
 
 
-
+const char *CitadelServiceSMTP_MTA="SMTP-MTA";
+const char *CitadelServiceSMTPS_MTA="SMTPs-MTA";
+const char *CitadelServiceSMTP_MSA="SMTP-MSA";
+const char *CitadelServiceSMTP_LMTP="LMTP";
+const char *CitadelServiceSMTP_LMTP_UNF="LMTP-UnF";
 
 CTDL_MODULE_INIT(smtp)
 {
@@ -1811,33 +1816,38 @@ CTDL_MODULE_INIT(smtp)
                                NULL,
                                smtp_mta_greeting,
                                smtp_command_loop,
-                               NULL);
+                               NULL, 
+                               CitadelServiceSMTP_MTA);
 
 #ifdef HAVE_OPENSSL
        CtdlRegisterServiceHook(config.c_smtps_port,
                                NULL,
                                smtps_greeting,
                                smtp_command_loop,
-                               NULL);
+                               NULL,
+                               CitadelServiceSMTPS_MTA);
 #endif
 
        CtdlRegisterServiceHook(config.c_msa_port,      /* SMTP MSA */
                                NULL,
                                smtp_msa_greeting,
                                smtp_command_loop,
-                               NULL);
+                               NULL,
+                               CitadelServiceSMTP_MSA);
 
        CtdlRegisterServiceHook(0,                      /* local LMTP */
                                file_lmtp_socket,
                                lmtp_greeting,
                                smtp_command_loop,
-                               NULL);
+                               NULL,
+                               CitadelServiceSMTP_LMTP);
 
        CtdlRegisterServiceHook(0,                      /* local LMTP */
                                file_lmtp_unfiltered_socket,
                                lmtp_unfiltered_greeting,
                                smtp_command_loop,
-                               NULL);
+                               NULL,
+                               CitadelServiceSMTP_LMTP_UNF);
 
        smtp_init_spoolout();
        CtdlRegisterSessionHook(smtp_do_queue, EVT_TIMER);