SMTP-Client: summary log success / fail of delivery attempts.
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 23 Apr 2012 11:04:36 +0000 (13:04 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 23 Apr 2012 11:04:36 +0000 (13:04 +0200)
citadel/modules/smtp/serv_smtpeventclient.c
citadel/modules/smtp/smtp_clienthandlers.c

index 05b06aac4c8328c123557c12de61f4f86875623b..1698ab74773c1886d7152a3e6b088f1594b12abc 100644 (file)
@@ -136,7 +136,25 @@ eNextState FinalizeMessageSend_DB4(AsyncIO *IO);
  ******************************************************************************/
 inline void FinalizeMessageSend_1(AsyncIO *IO)
 {
+       const char *Status;
        SmtpOutMsg *Msg = IO->Data;
+       
+       if (Msg->MyQEntry->Status == 2) 
+               Status = "Delivery Successfull.";
+       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 Recipient <%s> @ <%s> (%s) Statusmessage: %s\n",
+                  Status,
+                  Msg->user,
+                  Msg->node,
+                  Msg->name,
+                  ChrPtr(Msg->MyQEntry->StatusMessage));
+
+
        Msg->IDestructQueItem = DecreaseQReference(Msg->MyQItem);
 
        Msg->nRemain = CountActiveQueueEntries(Msg->MyQItem);
index 30f6a6f50df5fa26c7153e0dafb1aa955af6273f..09a1bd881b1bf1162ca43b3bb6f059e2f452a257 100644 (file)
@@ -373,7 +373,7 @@ eNextState SMTPC_read_QUIT_reply(SmtpOutMsg *Msg)
        AsyncIO *IO = &Msg->IO;
        SMTP_DBG_READ();
 
-       EVS_syslog(LOG_INFO,
+       EVS_syslog(LOG_DEBUG,
                   "SMTP client[%ld]: delivery to <%s> @ <%s> (%s) succeeded\n",
                   Msg->n,
                   Msg->user,