X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fsmtp%2Fserv_smtpeventclient.c;h=c7de74fac3e9da7fffd65b10251b42c36a9411af;hb=8ffb37bf859b810c6f3c0895d1cd2edba32e54bf;hp=a411ef7d1ecf2575ef0bface76afe53da8ca20cc;hpb=bf31c5960c968bae13c8ad62c51bd23bc8baa809;p=citadel.git diff --git a/citadel/modules/smtp/serv_smtpeventclient.c b/citadel/modules/smtp/serv_smtpeventclient.c index a411ef7d1..c7de74fac 100644 --- a/citadel/modules/smtp/serv_smtpeventclient.c +++ b/citadel/modules/smtp/serv_smtpeventclient.c @@ -91,7 +91,6 @@ #include "smtp_clienthandlers.h" int SMTPClientDebugEnabled = 0; -const unsigned short DefaultMXPort = 25; void DeleteSmtpOutMsg(void *v) { SmtpOutMsg *Msg = v; @@ -322,6 +321,8 @@ eNextState get_one_mx_host_ip_done(AsyncIO *IO) SmtpOutMsg *Msg = IO->Data; struct hostent *hostent; + IO->ConnectMe = Msg->pCurrRelay; + QueryCbDone(IO); EVS_syslog(LOG_DEBUG, "%s Time[%fs]\n", __FUNCTION__, @@ -339,7 +340,7 @@ eNextState get_one_mx_host_ip_done(AsyncIO *IO) Msg->pCurrRelay->Addr.sin6_family = hostent->h_addrtype; Msg->pCurrRelay->Addr.sin6_port = - htons(DefaultMXPort); + htons(Msg->IO.ConnectMe->Port); } else { struct sockaddr_in *addr; @@ -357,7 +358,7 @@ eNextState get_one_mx_host_ip_done(AsyncIO *IO) sizeof(uint32_t)); addr->sin_family = hostent->h_addrtype; - addr->sin_port = htons(DefaultMXPort); + addr->sin_port = htons(Msg->IO.ConnectMe->Port); } Msg->mx_host = Msg->pCurrRelay->Host; if (Msg->HostLookup.VParsedDNSReply != NULL) {