]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/smtp/serv_smtpeventclient.c
More logging for rssclient and pop3client holdoff and concurrency checks
[citadel.git] / citadel / modules / smtp / serv_smtpeventclient.c
index 3037b0c0c65e39cb7f7a7fecb4c843365f2800a2..f15a18564a669a43266edb6ae1f4996d4578b47d 100644 (file)
@@ -90,6 +90,7 @@
 #include "smtpqueue.h"
 #include "smtp_clienthandlers.h"
 
+int SMTPClientDebugEnabled = 0;
 const unsigned short DefaultMXPort = 25;
 void DeleteSmtpOutMsg(void *v)
 {
@@ -140,14 +141,14 @@ inline void FinalizeMessageSend_1(AsyncIO *IO)
        SmtpOutMsg *Msg = IO->Data;
        
        if (Msg->MyQEntry->Status == 2) 
-               Status = "Delivery Successfull.";
+               Status = "Delivery successful.";
        else if (Msg->MyQEntry->Status == 5) 
                Status = "Delivery failed permanently; giving up.";
        else
                Status = "Delivery failed temporarily; will retry later.";
                        
        EVS_syslog(LOG_INFO,
-                  "SMTP: %s Time[%fs] Recipient <%s> @ <%s> (%s) Statusmessage: %s\n",
+                  "SMTP: %s Time[%fs] Recipient <%s> @ <%s> (%s) Status message: %s\n",
                   Status,
                   Msg->IO.Now - Msg->IO.StartIO,
                   Msg->user,
@@ -829,7 +830,14 @@ eReadState SMTP_C_ReadServerStatus(AsyncIO *IO)
        return Finished;
 }
 
+void LogDebugEnableSMTPClient(void)
+{
+       SMTPClientDebugEnabled = 1;
+}
+
 CTDL_MODULE_INIT(smtp_eventclient)
 {
+       if (!threading)
+               CtdlRegisterDebugFlagHook(HKEY("smtpeventclient"), LogDebugEnableSMTPClient);
        return "smtpeventclient";
 }