Name of MX in error messages
authorWilfried Goesgens <dothebart@citadel.org>
Thu, 28 Apr 2011 19:10:56 +0000 (19:10 +0000)
committerWilfried Goesgens <dothebart@citadel.org>
Thu, 28 Apr 2011 19:10:56 +0000 (19:10 +0000)
  - set it after successfull MX lookup
  - put in that we don't have an mx record if its NULL instead of 'no name'

citadel/modules/smtp/serv_smtpeventclient.c

index 85ef2813bcec4144077031c14594c8c7c723bb90..fcec898cb60b1123cffdc2e6e1b6f9893fc10349 100644 (file)
@@ -207,7 +207,7 @@ void SetConnectStatus(AsyncIO *IO)
                  sizeof(buf));
 
        if (SendMsg->mx_host == NULL)
-               SendMsg->mx_host = "<no name>";
+               SendMsg->mx_host = "<no MX-Record>";
 
        CtdlLogPrintf(CTDL_DEBUG, 
                      "SMTP client[%ld]: connecting to %s [%s]:%d ...\n", 
@@ -275,6 +275,7 @@ eNextState get_one_mx_host_ip_done(AsyncIO *IO)
                        addr->sin_port   = htons(DefaultMXPort);
                        
                }
+               SendMsg->mx_host = SendMsg->pCurrRelay->Host;
                return mx_connect_ip(IO);
        }
        else // TODO: here we need to find out whether there are more mx'es, backup relay, and so on