aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--driver.c28
2 files changed, 18 insertions, 13 deletions
diff --git a/NEWS b/NEWS
index 8d2a0728..0f2c4dd0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,5 @@
Things to do:
-Notify user by mail when pop server nonexistent (Debian wishlist #47143).
-
In the SSL support, we need to add server certificate validation (In
other words, does the certificate match the system we are trying to
contact?). Also, add authentication of Certifying Authority (Is this
@@ -32,6 +30,7 @@ The Debian bug-tracking page for fetchmail is:
* Support for RFC2449 extended POP3 responses [IN-USE] and [LOGIN-DELAY].
* Log bounced messages via syslog (Debian bug #50184).
* Add scrollbars on fetchmailconf help windows (Debian bug #51770).
+* Notify user by mail when pop server nonexistent (Debian bug #47143).
* Debian buglist cleanup.
fetchmail-5.2.5 (Mon Jan 31 02:02:48 EST 2000), 18445 lines:
diff --git a/driver.c b/driver.c
index 4692f009..cd89408e 100644
--- a/driver.c
+++ b/driver.c
@@ -1585,6 +1585,7 @@ const int maxfetch; /* maximum number of messages to fetch */
if ((mailserver_socket = SockOpen(realhost, port, NULL, ctl->server.plugin)) == -1)
#endif /* INET6_ENABLE */
{
+ char errbuf[BUFSIZ];
#if !INET6_ENABLE
int err_no = errno;
#ifdef HAVE_RES_SEARCH
@@ -1604,25 +1605,30 @@ const int maxfetch; /* maximum number of messages to fetch */
if (h_errno != 0)
{
if (h_errno == HOST_NOT_FOUND)
- report_complete(stderr,
- _(": host is unknown\n"));
+ strcpy(errbuf, _("host is unknown."));
else if (h_errno == NO_ADDRESS)
- report_complete(stderr,
- _(": name is valid but has no IP address\n"));
+ strcpy(errbuf, _("name is valid but has no IP address."));
else if (h_errno == NO_RECOVERY)
- report_complete(stderr,
- _(": unrecoverable name server error\n"));
+ strcpy(errbuf, _("unrecoverable name server error."));
else if (h_errno == TRY_AGAIN)
- report_complete(stderr,
- _(": temporary name server error\n"));
+ strcpy(errbuf, _("temporary name server error."));
else
- report_complete(stderr,
- _(": unknown DNS error %d\n"), h_errno);
+ sprintf(errbuf, _("unknown DNS error %d."), h_errno);
}
else
#endif /* HAVE_RES_SEARCH */
- report_complete(stderr, ": %s\n", strerror(err_no));
+ strcpy(errbuf, strerror(err_no));
+ report_complete(stderr, ": %s\n", errbuf);
+ /* warn the system administrator */
+ if (open_warning_by_mail(ctl, (struct msgblk *)NULL) == 0)
+ {
+#define OPENFAIL "Subject: Fetchmail unreachable-server warning.\r\n\r\nFetchmail could not reach the mail server %s:"
+ stuff_warning(ctl, OPENFAIL, ctl->server.pollname);
+ stuff_warning(ctl, errbuf, ctl->server.pollname);
+ close_warning_by_mail(ctl, (struct msgblk *)NULL);
+ }
+#undef OPENFAIL
}
#endif /* INET6_ENABLE */
ok = PS_SOCKET;