summaryrefslogtreecommitdiffstats
path: root/qmail-remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'qmail-remote.c')
-rw-r--r--qmail-remote.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/qmail-remote.c b/qmail-remote.c
index be997f0..dc00d08 100644
--- a/qmail-remote.c
+++ b/qmail-remote.c
@@ -569,7 +569,8 @@ void smtp()
569#endif 569#endif
570 570
571 code = smtpcode(); 571 code = smtpcode();
572 if (code >= 500) quit("DConnected to "," but greeting failed"); 572 if (code >= 500 && code < 600) quit("DConnected to "," but greeting failed");
573 if (code >= 400 && code < 500) return; /* try next MX, see RFC-2821 */
573 if (code != 220) quit("ZConnected to "," but greeting failed"); 574 if (code != 220) quit("ZConnected to "," but greeting failed");
574 575
575#ifdef EHLO 576#ifdef EHLO
@@ -948,7 +949,7 @@ char **argv;
948#ifdef TLS 949#ifdef TLS
949 partner_fqdn = ip.ix[i].fqdn; 950 partner_fqdn = ip.ix[i].fqdn;
950#endif 951#endif
951 smtp(); /* does not return */ 952 smtp(); /* only returns when the next MX is to be tried */
952 } 953 }
953 tcpto_err(&ip.ix[i].ip,errno == error_timeout); 954 tcpto_err(&ip.ix[i].ip,errno == error_timeout);
954 close(smtpfd); 955 close(smtpfd);