aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-05-06 12:59:02 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-05-06 12:59:02 +0000
commit48edecb8654348e5de7e5c35de3da60bc2553123 (patch)
tree8722e2f0fbb20fcd0491073da9608507113a0bf5
parent6085ee3e7825efd7a9684fe3af0261a6fc3bacd0 (diff)
downloadfetchmail-48edecb8654348e5de7e5c35de3da60bc2553123.tar.gz
fetchmail-48edecb8654348e5de7e5c35de3da60bc2553123.tar.bz2
fetchmail-48edecb8654348e5de7e5c35de3da60bc2553123.zip
Mike McAllister sent a fix for qvirtual.
svn path=/trunk/; revision=1758
-rw-r--r--NEWS2
-rw-r--r--driver.c29
-rw-r--r--fetchmail.man3
3 files changed, 19 insertions, 15 deletions
diff --git a/NEWS b/NEWS
index 9724d225..e92de415 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,8 @@
fetchmail-4.4.4 ():
* Francois Wautier's fix for qvirtual.
* Willem Hengeveld's fix for UID initialization.
+* Strip out qvirtual prefix *before* doing name mapping (Mike McCallister
+ <mccallis@netcom.com>)
fetchmail-4.4.3 (Sun Apr 19 18:22:00 EDT 1998):
* Back out one of the changes to the null Return-Path handling, as it caused
diff --git a/driver.c b/driver.c
index fe8bec8a..9c1db97d 100644
--- a/driver.c
+++ b/driver.c
@@ -261,25 +261,26 @@ struct idlist **xmit_names; /* list of recipient names parsed out */
int sl;
int off = 0;
- lname = idpair_find(&ctl->localnames, name);
- if (!lname && ctl->wildcard)
- lname = name;
-
- if (lname != (char *)NULL)
- {
- /*
- * If the name of the user begins with a
- * qmail virtual domain prefix, remove
- * the prefix
- */
+ /*
+ * If the name of the user begins with a
+ * qmail virtual domain prefix, remove
+ * the prefix
+ */
if (ctl->server.qvirtual)
{
sl=strlen(ctl->server.qvirtual);
- if (!strncasecmp(lname,ctl->server.qvirtual,sl)) off=sl;
+ if (!strncasecmp(name,ctl->server.qvirtual,sl)) off=sl;
}
+
+ lname = idpair_find(&ctl->localnames, name+off);
+ if (!lname && ctl->wildcard)
+ lname = name+off;
+
+ if (lname != (char *)NULL)
+ {
if (outlevel == O_VERBOSE)
- error(0, 0, "mapped %s to local %s", name, lname+off);
- save_str(xmit_names, lname+off, XMIT_ACCEPT);
+ error(0, 0, "mapped %s to local %s", name, lname);
+ save_str(xmit_names, lname, XMIT_ACCEPT);
accept_count++;
}
}
diff --git a/fetchmail.man b/fetchmail.man
index da9d3e51..122d85d3 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -389,7 +389,8 @@ in the \fI.fetchmailrc\fR file.
.B -Q, --qvirtual
(Keyword: qvirtual)
The string assigned to this option will be removed from the user
-name found in the header specified with the \fIenvelope\fR option.
+name found in the header specified with the \fIenvelope\fR option
+(\fIbefore\fR doing multidrop name mapping, if applicable).
This option is useful if you are using
.I fetchmail
to collect the mail for an entire domain and your ISP (or your mail