aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-05-06 14:09:29 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-05-06 14:09:29 +0000
commit8248dd83593a349c6ba6e180ba2e19b881ac2cf0 (patch)
tree468fb857fb22fb479313a41df55b1851d65df3a1 /driver.c
parent60904e5548f4304d027739e998587252e5562949 (diff)
downloadfetchmail-8248dd83593a349c6ba6e180ba2e19b881ac2cf0.tar.gz
fetchmail-8248dd83593a349c6ba6e180ba2e19b881ac2cf0.tar.bz2
fetchmail-8248dd83593a349c6ba6e180ba2e19b881ac2cf0.zip
Ready to release.
svn path=/trunk/; revision=1760
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/driver.c b/driver.c
index 5fec2a3c..84a968aa 100644
--- a/driver.c
+++ b/driver.c
@@ -261,18 +261,6 @@ struct idlist **xmit_names; /* list of recipient names parsed out */
int sl;
int off = 0;
- /*
- * 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(name,ctl->server.qvirtual,sl))
- off = sl;
- }
-
lname = idpair_find(&ctl->localnames, name+off);
if (!lname && ctl->wildcard)
lname = name+off;
@@ -304,6 +292,20 @@ struct idlist **xmit_names; /* list of recipient names parsed out */
{
char *atsign;
+ /*
+ * If the name of the user begins with a qmail virtual
+ * domain prefix, ignore the prefix. Doing this here
+ * means qvirtual will work either with ordinary name
+ * mapping or with a localdomains option.
+ */
+ if (ctl->server.qvirtual)
+ {
+ int sl = strlen(ctl->server.qvirtual);
+
+ if (!strncasecmp(cp, ctl->server.qvirtual, sl))
+ cp += sl;
+ }
+
if ((atsign = strchr(cp, '@'))) {
struct idlist *idp;
@@ -355,7 +357,7 @@ struct idlist **xmit_names; /* list of recipient names parsed out */
static char *parse_received(struct query *ctl, char *bufp)
/* try to extract real address from the Received line */
/* If a valid Received: line is found, we return the full address in
- * a buffer wich can be parsed from nxtaddr(). This is to ansure that
+ * a buffer which can be parsed from nxtaddr(). This is to ansure that
* the local domain part of the address can be passed along in
* find_server_names() if it contains one.
* Note: We should return a dummy header containing the address