|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Victor Duchovni (Victor.Duchovni
morganstanley.com)Date: Tue Oct 02 2001 - 13:18:41 CDT
Michael, your table (specifically the second to last entry)
is not accurate...
with user+ext
example.com and table entry of
example.com luser
example.org
The rewrite is luser+ext
example.org:
Prior to 200102028pl05 there was another case that came out wrong:
user
example.com
example.org
with rewrite to user+ext+ext
example.org without the patch, and
user+ext with the patch. For full disclosure the released patch is
not the whole story (partly my fault), the correct code is:
if ((string = mail_addr_find(path, address, &extension)) != 0) {
/*
* Prepend the original user to
otherdomain.
*/
if (*string == '
') {
buffer = vstring_alloc(100);
if ((ratsign = strchr(address, '
')) != 0)
vstring_strncpy(buffer, address, ratsign - address);
else
vstring_strcpy(buffer, address);
if (extension)
vstring_truncate(buffer, LEN(buffer) - strlen(extension));
vstring_strcat(buffer, string);
string = STR(buffer);
}
/*
* Canonicalize and externalize the result, and propagate the
* unmatched extension to each address found.
*/
argv = mail_addr_crunch(string, propagate ? extension : 0);
if (buffer)
vstring_free(buffer);
if (msg_verbose)
for (i = 0; i < argv->argc; i++)
msg_info("%s: %s -> %d: %s", myname, address, i,
argv->argv[i]);
}
> From: Michael Tokarev
> []
> > What would I use to get the original username if "virtual" had:
> >
> >
domain.com someuser
otherdomain.com
> >
> > and mail was sent to xyzzy
domain.com (note: no extension). I think
>
> Aha. This makes sense. And this *is* documented in virtual(5) manpage.
>
> Let's draw a table:
>
> rcpt address vkey vval result
> a
b.c a
b.c x
y.z x
y.z
>
b.c x
y.z x
y.z
>
b.c
y.z a
y.z
> a+e
b.c a+e
b.c x
y.z x
y.z
> a
b.c x
y.z x+e
y.z <==
>
b.c x
y.z x
y.z <====
>
b.c
y.z a+e
y.z <==
>
-
To unsubscribe, send mail to majordomo
postfix.org with content
(not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]