On Fri, Jan 22, 2010 at 09:16:07AM -0500, Wietse Venema wrote:
> > The lookup keys and RHS values for virtual(5) are in rfc822 format.
> > A PCRE table can take care of this:
>
> Virtual alias lookups are done in the "unquoted" form, while
> canonical map lookups are in "quoted" form.
No, the cleanup(8) server virtual lookup key and value are in rfc822
quoted form, and will correctly process:
[email protected]
"internal,comma"@example.com,
"internal whitespace"@example.net,
...
> So, the above form is good for canonical mapping, but virtual
> alias mapping would require that the quotes be stripped:
>
See src/cleanup/cleanup_map1n.c around line 118:
quote_822_local(state->temp1, argv->argv[arg]);
if ((lookup = mail_addr_map(maps, STR(state->temp1), propagate)) != 0) {
...
}
Of course the address may not get that far, because the SMTP server
uses the internal form of the address when doing recipient validation:
static int check_rcpt_maps(SMTPD_STATE *state, const char *recipient,
const char *reply_class)
{
...
if (MATCH(rcpt_canon_maps, CONST_STR(reply->recipient))
|| MATCH(canonical_maps, CONST_STR(reply->recipient))
|| MATCH(virt_alias_maps, CONST_STR(reply->recipient)))
return (0);
One could argue that the SMTP server should use the external form of the
recipient for these lookup, to match downstream behaviour in cleanup(8)...
--
Viktor.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[email protected]?body=unsubscribe%20postfix-users>
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.