From: Sunil S. <sh...@bo...> - 2005-12-19 13:42:01
|
Quoting from Matthias Andree's mail on Mon, Dec 19, 2005: > > Here is a patch which fixes this issue. This basically removes the > > global smtp_mode variable and passes the desired mode in every smtp > > function. > > Wow, that patch is huge. I'll happily merge it or something similar > onto the trunk (cleanup is always good), but for 6.3.1 I'd prefer a > smaller patch, even if it means hacking the state structures in some > places (for instance, upon sending a bounce and completion of the bounce > function). There are two problems that that patch fixes: - After switching to LMTP mode when trying out multiple smtphosts, fetchmail never switches back to SMTP mode and continues talking LMTP to the next SMTP socket. In daemon mode, it will not even talk SMTP on the next poll of that mailserver. $ fetchmail -v --smtphost /this/socket/is/down,localhost The source of this problem is that ctl->listener is never reset to SMTP_MODE. - After sending a bounce, fetchmail does not switch back to LMTP mode and continues talking SMTP to the LMTP socket. In daemon mode, however, it will talk LMTP on the next run. The source of this problem is that the global variable smtp_mode is never reset to LMTP_MODE in that poll. A smaller patch can fix only one of the two issues. I assume that you are interested in keeping the global variable smtp_mode. The problem is that fetchmail has too many return points (including return via longjump()) and ensuring that smtp_mode is indeed reset to its original value in all cases is not going to really make the patch smaller. If you wish, you may instead apply the patch against the trunk only. -- Sunil Shetye. |