aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-06-24 16:04:26 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-06-24 16:04:26 +0000
commit16904b67165ab371bfef3313cf84b513a43aa298 (patch)
tree27c921cffcbe1b36f4d9868f37f0bc7990716bac
parentf29cf2421da9aaed0af1d17efe82ba3a2a2592d8 (diff)
downloadfetchmail-16904b67165ab371bfef3313cf84b513a43aa298.tar.gz
fetchmail-16904b67165ab371bfef3313cf84b513a43aa298.tar.bz2
fetchmail-16904b67165ab371bfef3313cf84b513a43aa298.zip
Fix Jochen's bug.
svn path=/trunk/; revision=1109
-rw-r--r--NEWS5
-rw-r--r--fetchmail.c14
2 files changed, 13 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index 17103c88..7df0b277 100644
--- a/NEWS
+++ b/NEWS
@@ -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",