SMTP-Client: add the current hostname we're talking to to the status.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 19 Aug 2012 16:45:33 +0000 (18:45 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 19 Aug 2012 16:45:33 +0000 (18:45 +0200)
citadel/modules/smtp/serv_smtpeventclient.c

index c744bb6e4cb81fd3bf2d99a60834d6c21c04f435..bb11522c19eb29af47a00086fd34f605803c57bc 100644 (file)
@@ -774,7 +774,9 @@ eNextState SMTP_C_Timeout(AsyncIO *IO)
 
        Msg->MyQEntry->Status = 4;
        EVS_syslog(LOG_DEBUG, "%s\n", __FUNCTION__);
-       StrBufPlain(IO->ErrMsg, CKEY(ReadErrors[Msg->State]));
+       StrBufPrintf(IO->ErrMsg, "Timeout: %s while talking to %s",
+                    ReadErrors[Msg->State].Key,
+                    Msg->mx_host);
        if (Msg->State > eRCPT)
                return eAbort;
        else
@@ -786,7 +788,10 @@ eNextState SMTP_C_ConnFail(AsyncIO *IO)
 
        Msg->MyQEntry->Status = 4;
        EVS_syslog(LOG_DEBUG, "%s\n", __FUNCTION__);
-       StrBufPlain(IO->ErrMsg, CKEY(ReadErrors[Msg->State]));
+       StrBufPrintf(IO->ErrMsg, "Connection failure: %s while talking to %s",
+                    ReadErrors[Msg->State].Key,
+                    Msg->mx_host);
+
        return FailOneAttempt(IO);
 }
 eNextState SMTP_C_DNSFail(AsyncIO *IO)