diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-01-09 00:49:23 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-01-09 00:49:23 +0000 |
commit | 59623f1ce855c4cf3e6911218fd61dc5485cdba0 (patch) | |
tree | ced653563fdd9a2576edd27ae711412ff8c44aa6 | |
parent | e8bfa667502a4e154551b0ded9bea88a3bfb6d7b (diff) | |
download | fetchmail-59623f1ce855c4cf3e6911218fd61dc5485cdba0.tar.gz fetchmail-59623f1ce855c4cf3e6911218fd61dc5485cdba0.tar.bz2 fetchmail-59623f1ce855c4cf3e6911218fd61dc5485cdba0.zip |
Don't use SMTP leader's name for HELO line.
svn path=/trunk/; revision=721
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | driver.c | 24 |
2 files changed, 16 insertions, 11 deletions
@@ -20,6 +20,9 @@ bugs -- * Fixed bug in SMTP forwarding of msg lines with leading dot. +* Fixed a bug that generated incorrect HELO for second and subsequent + poll entries attached to the same SMTP host. + There are 176 people on the fetchmail-friends list. ------------------------------------------------------------------------------ @@ -267,30 +267,32 @@ struct idlist **xmit_names; /* list of recipient names parsed out */ static FILE *smtp_open(struct query *ctl) /* try to open a socket to the appropriate SMTP server for this query */ { - ctl = ctl->lead_smtp; /* go to the SMTP leader for this query */ + struct query *lead; + + lead = ctl->lead_smtp; /* go to the SMTP leader for this query */ /* maybe it's time to close the socket in order to force delivery */ - if (batchlimit && ctl->smtp_sockfp && batchcount++ == batchlimit) + if (batchlimit && lead->smtp_sockfp && batchcount++ == batchlimit) { - fclose(ctl->smtp_sockfp); - ctl->smtp_sockfp = (FILE *)NULL; + fclose(lead->smtp_sockfp); + lead->smtp_sockfp = (FILE *)NULL; batchcount = 0; } /* if no socket to this host is already set up, try to open one */ - if (ctl->smtp_sockfp == (FILE *)NULL) + if (lead->smtp_sockfp == (FILE *)NULL) { - if ((ctl->smtp_sockfp = SockOpen(ctl->smtphost, SMTP_PORT)) == (FILE *)NULL) + if ((lead->smtp_sockfp = SockOpen(lead->smtphost, SMTP_PORT)) == (FILE *)NULL) return((FILE *)NULL); - else if (SMTP_ok(ctl->smtp_sockfp) != SM_OK - || SMTP_helo(ctl->smtp_sockfp, ctl->servernames->id) != SM_OK) + else if (SMTP_ok(lead->smtp_sockfp) != SM_OK + || SMTP_helo(lead->smtp_sockfp, ctl->servernames->id) != SM_OK) { - fclose(ctl->smtp_sockfp); - ctl->smtp_sockfp = (FILE *)NULL; + fclose(lead->smtp_sockfp); + lead->smtp_sockfp = (FILE *)NULL; } } - return(ctl->smtp_sockfp); + return(lead->smtp_sockfp); } static int gen_readmsg (sockfp, len, delimited, ctl) |