From 6da7693ce8c3391c5b7e1cf61edd89a4179961a8 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 1 Dec 2000 09:47:53 +0000 Subject: The retry patch. svn path=/trunk/; revision=2994 --- NEWS | 8 ++++++++ driver.c | 51 +++++++++++++++++++++++++++++++++++++------------ fetchmail-FAQ.html | 8 ++++---- fetchmail-features.html | 6 ++++-- 4 files changed, 55 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index d6162557..e85f23e9 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,14 @@ (The `lines' figures total .c, .h, .l, and .y files under version control.) +* More on ETRN in the FAQ. +* Horst Klokow's patch to make interface check the remote IP address. +* Roger Luethi's patc to write the UIDL file when you hit a fetchlimit. +* Don Beusee's patch to eliminate wedging on authentication failure. + Instead, fetchmail will now notify the user on the third failure, then + continue polling silently until service is restored (at which time the + user will get a notification). + ------------------------------------------------------------------------------ fetchmail-5.6.0 (Sun Nov 26 22:11:09 EST 2000), 19625 lines: diff --git a/driver.c b/driver.c index f6d34e2d..c531037b 100644 --- a/driver.c +++ b/driver.c @@ -1818,9 +1818,12 @@ const int maxfetch; /* maximum number of messages to fetch */ * calling user a heads-up about the authentication * failure once it looks like this isn't a fluke * due to the server being temporarily inaccessible. + * When we get third failure, we notify the user. After + * that, once we get authorization we let the user know + * service is restored. */ if (run.poll_interval - && ctl->authfailcount++ > MAX_AUTHFAILS + && ++ctl->authfailcount == 3 && !open_warning_by_mail(ctl, (struct msgblk *)NULL)) { stuff_warning(ctl, @@ -1829,13 +1832,16 @@ const int maxfetch; /* maximum number of messages to fetch */ _("Fetchmail could not get mail from %s@%s.\r\n"), ctl->remotename, ctl->server.truename); - stuff_warning(ctl, - _("The attempt to get authorization failed.\r\n" \ - "This probably means your password is invalid, but POP3 servers have\r\n" \ - "other failure modes that fetchmail cannot distinguish from this\r\n" \ - "because they don't send useful error messages on login failure.\r\n")); + stuff_warning(ctl, _("\ +The attempt to get authorization failed.\r\n\ +This probably means your password is invalid, but some servers have\r\n\ +other failure modes that fetchmail cannot distinguish from this\r\n\ +because they don't send useful error messages on login failure.\r\n\ +\r\n\ +The fetchmail daemon will continue running and attempt to connect\r\n\ +at each cycle. No future notifications will be sent until service\r\n\ +is restored.")); close_warning_by_mail(ctl, (struct msgblk *)NULL); - ctl->wedged = TRUE; } } else @@ -1845,6 +1851,30 @@ const int maxfetch; /* maximum number of messages to fetch */ goto cleanUp; } + else + { + if (ctl->authfailcount >= 3) + { + report(stderr, + _("Authorization OK on %s@%s\n"), + ctl->remotename, + ctl->server.truename); + if (!open_warning_by_mail(ctl, (struct msgblk *)NULL)) + { + stuff_warning(ctl, + _("Subject: fetchmail authentication OK\r\n")); + stuff_warning(ctl, + _("Fetchmail was able to log into %s@%s.\r\n"), + ctl->remotename, + ctl->server.truename); + stuff_warning(ctl, + _("Service has been restored.\r\n")); + close_warning_by_mail(ctl, (struct msgblk *)NULL); + + } + ctl->authfailcount = 0; + } + } } ctl->errcount = fetches = 0; @@ -2344,9 +2374,6 @@ const int maxfetch; /* maximum number of messages to fetch */ case PS_SOCKET: msg = _("socket"); break; - case PS_AUTHFAIL: - msg = _("authorization"); - break; case PS_SYNTAX: msg = _("missing or bad RFC822 header"); break; @@ -2372,8 +2399,8 @@ const int maxfetch; /* maximum number of messages to fetch */ report(stderr, _("undefined error\n")); break; } - /* no report on PS_MAXFETCH or PS_UNDEFINED */ - if (ok==PS_SOCKET || ok==PS_AUTHFAIL || ok==PS_SYNTAX + /* no report on PS_MAXFETCH or PS_UNDEFINED or PS_AUTHFAIL */ + if (ok==PS_SOCKET || ok==PS_SYNTAX || ok==PS_IOERR || ok==PS_ERROR || ok==PS_PROTOCOL || ok==PS_LOCKBUSY || ok==PS_SMTP || ok==PS_DNS) report(stderr, _("%s error while fetching from %s\n"), msg, ctl->server.pollname); diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html index 947699b1..84a3b8d2 100644 --- a/fetchmail-FAQ.html +++ b/fetchmail-FAQ.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 2000/12/01 06:22:45 $ +$Date: 2000/12/01 09:47:52 $

Frequently Asked Questions About Fetchmail

@@ -175,7 +175,7 @@ to mail retrieval and rerouting for an entire client domain. Fetchmail is easy to configure, unobtrusive in operation, powerful, feature-rich, and well documented.

-Fetchmail is Open Source +Fetchmail is open-source software. The openness of the sources is the strongest assurance of quality you can have. Extensive peer review by a large, multi-platform user community has shown that fetchmail is as near @@ -626,7 +626,7 @@ Fetchmail is fully Y2K-compliant.

Fetchmail could theoretically have problems when the 32-bit time_t counters roll over in 2038, but I doubt it. Timestamps aren't used for anything but log entry generation. Anyway, if you aren't running -on a 64-bit machine by then, you deserve to lose.

+on a 64-bit machine by then, you'll deserve to lose.


G14. Is there a way in fetchmail to support disconnected IMAP mode?

@@ -2971,7 +2971,7 @@ install Linux on your server...

Back to Fetchmail Home Page To Site Map -$Date: 2000/12/01 06:22:45 $ +$Date: 2000/12/01 09:47:52 $

Eric S. Raymond <esr@snark.thyrsus.com>
diff --git a/fetchmail-features.html b/fetchmail-features.html index 6bc065d4..474183b0 100644 --- a/fetchmail-features.html +++ b/fetchmail-features.html @@ -10,7 +10,7 @@
Back to Fetchmail Home Page To Site Map -$Date: 2000/08/06 09:01:42 $ +$Date: 2000/12/01 09:47:53 $

@@ -18,6 +18,8 @@

Since 5.0: