diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-12-13 00:36:18 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-12-13 00:36:18 +0000 |
commit | 335cb5e4606e4f5265292ae76b95793b2ed9f047 (patch) | |
tree | 8449f1b2d79a292b3c53d491add159b8f4563795 /fetchmail.c | |
parent | 92f3cbd9697a008c65a51f67f7dd9ffe720d317c (diff) | |
download | fetchmail-335cb5e4606e4f5265292ae76b95793b2ed9f047.tar.gz fetchmail-335cb5e4606e4f5265292ae76b95793b2ed9f047.tar.bz2 fetchmail-335cb5e4606e4f5265292ae76b95793b2ed9f047.zip |
Merge patch by Sunil Sheteye to fix five bugs:
* Close SMTP sockets early, to reduce resource usage, trigger earlier
delivery with some MTAs and avoid SIGPIPE (SIG 13) when the SMTP
listener gets bored and drops the connection after timeout.
* Don't treat hitting a fetch limit (PS_MAXFETCH) as error.
* Fix negative "messages left on server" on idle/repoll with fetchlimit.
* Properly track logout stage (STAGE_LOGOUT).
* Preserve error conditions across postconnect script.
svn path=/branches/BRANCH_6-3/; revision=4541
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/fetchmail.c b/fetchmail.c index 1f468bb8..9ee0d627 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -1277,38 +1277,9 @@ static int load_params(int argc, char **argv, int optind) static RETSIGTYPE terminate_poll(int sig) /* to be executed at the end of a poll cycle */ { - /* - * Close all SMTP delivery sockets. For optimum performance - * we'd like to hold them open til end of run, but (1) this - * loses if our poll interval is longer than the MTA's inactivity - * timeout, and (2) some MTAs (like smail) don't deliver after - * each message, but rather queue up mail and wait to actually - * deliver it until the input socket is closed. - * - * Sending SMTP QUIT on signal is theoretically nice, but led to a - * subtle bug. If fetchmail was terminated by signal while it was - * shipping message text, it would hang forever waiting for a - * command acknowledge. In theory we could enable the QUIT - * only outside of the message send. In practice, we don't - * care. All mailservers hang up on a dropped TCP/IP connection - * anyway. - */ if (sig != 0) report(stdout, GT_("terminated with signal %d\n"), sig); - else - { - struct query *ctl; - - /* terminate all SMTP connections cleanly */ - for (ctl = querylist; ctl; ctl = ctl->next) - if (ctl->smtp_socket != -1) - { - /* don't send QUIT for ODMR case because we're acting - as a proxy between the SMTP server and client. */ - smtp_close(ctl, ctl->server.protocol != P_ODMR); - } - } #ifdef POP3_ENABLE /* |