diff options
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fetchmail.c b/fetchmail.c index ebb2b899..49355f5c 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -325,10 +325,14 @@ int main (int argc, char **argv) struct hostent *namerec; /* compute the canonical name of the host */ + errno = 0; namerec = gethostbyname(ctl->servername); if (namerec == (struct hostent *)NULL) { - fprintf(stderr, + if (errno) + perror("fetchmail: initialization error"); + else + fprintf(stderr, "fetchmail: skipping %s poll, nameserver isn't responding\n", ctl->servername); continue; |