]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/pop3/serv_pop3.c
For the SSL-only ports, if crypto negotiation fails,
[citadel.git] / citadel / modules / pop3 / serv_pop3.c
index ba2faa1e1009ba4ac6190e221d094303818e9bb7..fadb9f50cc15b0096111c3f147f096b7905d3aff 100644 (file)
@@ -98,6 +98,7 @@ void pop3_greeting(void) {
  */
 void pop3s_greeting(void) {
        CtdlModuleStartCryptoMsgs(NULL, NULL, NULL);
+       if (!CC->redirect_ssl) CC->kill_me = 1;         /* kill session if no crypto */
        pop3_greeting();
 }
 
@@ -702,6 +703,8 @@ void pop3_command_loop(void) {
 
 }
 
+const char *CitadelServicePop3="POP3";
+const char *CitadelServicePop3S="POP3S";
 
 
 CTDL_MODULE_INIT(pop3)
@@ -710,13 +713,15 @@ CTDL_MODULE_INIT(pop3)
                                NULL,
                                pop3_greeting,
                                pop3_command_loop,
-                               NULL);
+                               NULL,
+                               CitadelServicePop3);
 #ifdef HAVE_OPENSSL
        CtdlRegisterServiceHook(config.c_pop3s_port,
                                NULL,
                                pop3s_greeting,
                                pop3_command_loop,
-                               NULL);
+                               NULL,
+                               CitadelServicePop3S);
 #endif
        CtdlRegisterSessionHook(pop3_cleanup_function, EVT_STOP);