diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-10-02 03:06:13 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-10-02 03:06:13 +0000 |
commit | b5ce06b90ea4283596a70458d72b474bcc9d24da (patch) | |
tree | 3d258bde9cb3a95f2b0c8dcd08dd1bd242ce770a /driver.c | |
parent | 1fcf9c01862b261c150dd0c55519699fec23615c (diff) | |
download | fetchmail-b5ce06b90ea4283596a70458d72b474bcc9d24da.tar.gz fetchmail-b5ce06b90ea4283596a70458d72b474bcc9d24da.tar.bz2 fetchmail-b5ce06b90ea4283596a70458d72b474bcc9d24da.zip |
Lica Olivetti's qvirtual option.
svn path=/trunk/; revision=1465
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -222,16 +222,28 @@ struct query *ctl; /* list of permissible aliases */ struct idlist **xmit_names; /* list of recipient names parsed out */ { const char *lname; - + 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 (ctl->server.qvirtual) + { + sl=strlen(ctl->server.qvirtual); + if (!strncasecmp(lname,ctl->server.qvirtual,sl)) off=sl; + } if (outlevel == O_VERBOSE) - error(0, 0, "mapped %s to local %s", name, lname); - save_str(xmit_names, XMIT_ACCEPT, lname); + error(0, 0, "mapped %s to local %s", name, lname+off); + save_str(xmit_names, XMIT_ACCEPT, lname+off); accept_count++; } } |