From: Sunil S. <sh...@bo...> - 2005-12-12 08:35:43
|
Hi, The attached patch fixes the following bugs: 1. fetchmail should close smtp socket as soon as its work is done. This matters when fetchmail is polling multiple hosts and the smtp sockets just pile up till the end of the run. A SIGPIPE can also be triggered if there is a lot of time interval between the end of poll of the first mailserver and the end of run. Running fetchmail -v, the output can be seen as: 6.3.0 querying mailserver1 (protocol IMAP) at ...: poll completed ... 6.3.0 querying mailserver2 (protocol IMAP) at ...: poll completed ... 6.3.0 querying mailserver3 (protocol IMAP) at ...: poll completed SMTP> QUIT SMTP< 221 2.0.0 localhost closing connection SMTP> QUIT SMTP< 221 2.0.0 localhost closing connection SMTP> QUIT SMTP< 221 2.0.0 localhost closing connection After this patch, the output will be: SMTP> QUIT SMTP< 221 2.0.0 localhost closing connection 6.3.0 querying mailserver1 (protocol IMAP) at ...: poll completed ... SMTP> QUIT SMTP< 221 2.0.0 localhost closing connection 6.3.0 querying mailserver2 (protocol IMAP) at ...: poll completed ... SMTP> QUIT SMTP< 221 2.0.0 localhost closing connection 6.3.0 querying mailserver3 (protocol IMAP) at ...: poll completed 2. PS_MAXFETCH is being treated as an error condition. It should be treated as a successful run instead. 3. On reaching the fetchlimit, a negative count is shown of mails remaining on the server when fetchmail IDLEs (or repolls) atleast once with this configuration before reaching the fetchlimit: poll mailserver protocol imap fetchlimit 150 idle The line looks like this: fetchlimit 150 reached; -99 messages left on server mailserver account user 4. stage should be set to STAGE_LOGOUT on a normal logout. Also, a new stage STAGE_PREAUTH has been added to handle the server greeting line (currently unused). stage is now an enum. 5. The value of err is overwritten if there is a postconnect script or during normal logout. It should be preserved as far as possible. -- Sunil Shetye. |