aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-10-06 05:18:08 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-10-06 05:18:08 +0000
commitf6f4275a05a9206cf5a1d48f6ffee13db310f4d8 (patch)
treee6ae394c9110e94a9855e8dc2f81ef98deba1734
parent72925acd2e14bc2d0f67df235d405c24b9c11a51 (diff)
downloadfetchmail-f6f4275a05a9206cf5a1d48f6ffee13db310f4d8.tar.gz
fetchmail-f6f4275a05a9206cf5a1d48f6ffee13db310f4d8.tar.bz2
fetchmail-f6f4275a05a9206cf5a1d48f6ffee13db310f4d8.zip
Popclient compatibility hack.
svn path=/trunk/; revision=236
-rw-r--r--NEWS4
-rw-r--r--fetchmail.c15
-rw-r--r--fetchmail.man5
3 files changed, 20 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 595b4ce2..52e88d2f 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,10 @@ features --
* When delivering to an MDA, print error and die (before deleting the message!)
if the MDA returns nonzero status. Better safe than sorry.
+* If fetchmail is called through a link named `popclient' it will look in
+ ~/.poprc for a run control file. Unless that file includes the deleted
+ options limit and localfolder this should actually work.
+
bug fixes --
* Makefile fixes for correct linking on Sparcs and avoiding duplication of
diff --git a/fetchmail.c b/fetchmail.c
index 19b08b01..cb9a1e89 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -113,11 +113,20 @@ char **argv;
strcpy(def_opts.remotename, user);
strcpy(def_opts.smtphost, "localhost");
- rcfile =
- (char *) xmalloc(strlen(home)+strlen(RCFILE_NAME)+2);
+ /*
+ * Backward-compatibility hack. If we're called by the name of the
+ * ancestral popclient, look for .poprc. This will actually work
+ * for popclient files that don't use the removed keywords.
+ */
+ if (strcmp("popclient", argv[0]) == 0)
+ tmpdir = ".poprc";
+ else
+ tmpdir = ".fetchmailrc";
+
+ rcfile = (char *) xmalloc(strlen(home)+strlen(tmpdir)+2);
strcpy(rcfile, home);
strcat(rcfile, "/");
- strcat(rcfile, RCFILE_NAME);
+ strcat(rcfile, tmpdir);
outlevel = O_NORMAL;
diff --git a/fetchmail.man b/fetchmail.man
index dfe70f80..1679b670 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -554,7 +554,10 @@ Send comments, bug reports, gripes, and the like to Eric S. Raymond
.SH NOTES
This program used to be called `popclient' (the name was changed
because it supports IMAP now and may well support more remote-fetch
-protocols such as DMSP in the future).
+protocols such as DMSP in the future). If called through a link named
+popclient, it will look in ~/.poprc for its run control file. As
+long as the file does not use the removed \fBlimit\fR or \fBlocalfolder\fR
+options, this should actually work.
.PP
The --stdout, --local, and --limit arguments of previous
versions have been removed. Those features did jobs that belonged to