diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-06-24 16:04:26 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-06-24 16:04:26 +0000 |
commit | 16904b67165ab371bfef3313cf84b513a43aa298 (patch) | |
tree | 27c921cffcbe1b36f4d9868f37f0bc7990716bac | |
parent | f29cf2421da9aaed0af1d17efe82ba3a2a2592d8 (diff) | |
download | fetchmail-16904b67165ab371bfef3313cf84b513a43aa298.tar.gz fetchmail-16904b67165ab371bfef3313cf84b513a43aa298.tar.bz2 fetchmail-16904b67165ab371bfef3313cf84b513a43aa298.zip |
Fix Jochen's bug.
svn path=/trunk/; revision=1109
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | fetchmail.c | 14 |
2 files changed, 13 insertions, 6 deletions
@@ -6,6 +6,10 @@ Features To Consider +* It would be nice to be able to have the '-c' and standard retrieval modes + return a zero exit status if *any* host had mail, not just the last one + checked. + * Generate bounce messages when delivery is refused. See RFC1891, RFC1894. * More log levels? @@ -18,6 +22,7 @@ pl 3.9.9 (): * We can now process multiple To headers a la Microsoft Exchange Server. * Avoid sending LIST and getting an error when no messages are waiting. +* Allow `fetchmail' to do wakeup even when no .fetchmailrc. pl 3.9.8 (Sat Jun 14 14:19:32 EDT 1997): * Fetchmail is now normally built with optimization. diff --git a/fetchmail.c b/fetchmail.c index a6a3a5b5..d29b6219 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -195,10 +195,6 @@ int main (int argc, char **argv) "No mailservers set up -- perhaps %s is missing?\n", rcfile); exit(0); } - else if (!quitmode && querylist == NULL) { - (void) fputs("fetchmail: no mailservers have been specified.\n", stderr); - exit(PS_SYNTAX); - } /* check for another fetchmail running concurrently */ pid = -1; @@ -222,6 +218,12 @@ int main (int argc, char **argv) fclose(lockfp); } + /* if no mail servers listed and nothing in background, we're done */ + if (!quitmode && pid == -1 && querylist == NULL) { + (void)fputs("fetchmail: no mailservers have been specified.\n",stderr); + exit(PS_SYNTAX); + } + /* perhaps user asked us to kill the other fetchmail */ if (quitmode) { @@ -285,8 +287,8 @@ int main (int argc, char **argv) { /* * Should never happen -- possible only if a background fetchmail - * croaks after the first kill probe above but before the SIGUSR1/SIGHUP - * transmission. + * croaks after the first kill probe above but before the + * SIGUSR1/SIGHUP transmission. */ fprintf(stderr, "fetchmail: elder sibling at %d died mysteriously.\n", |