From 30eb28c7fe75da83b9763b854e294ed39424a0d7 Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 19 Aug 2012 18:45:33 +0200 Subject: [PATCH] SMTP-Client: add the current hostname we're talking to to the status. --- citadel/modules/smtp/serv_smtpeventclient.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/citadel/modules/smtp/serv_smtpeventclient.c b/citadel/modules/smtp/serv_smtpeventclient.c index c744bb6e4..bb11522c1 100644 --- a/citadel/modules/smtp/serv_smtpeventclient.c +++ b/citadel/modules/smtp/serv_smtpeventclient.c @@ -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) -- 2.30.2