Charles Boling a écrit :
>> with SQL, there is no need to use pcre. just do that in the SQL query to
>> avoid having to keep an external file up to date...
> 
> ...except that the "+" (and everything between it and the "@") is *not*
> actually part of the email address. 

of course the "+" is part of the email address. you may want to reread
my post.

> To use your address as an example:
> 
> When Postfix receives an envelope for:
>       mouss+nob...@netoyen.net
> It automatically strips the "+nobulk" and what it actually looks up in
> the database is:
>       mo...@netoyen.net
> 

you want to read the docs about recipient_delimiter.

PS. mail to mouss-...@netoyen.net and mouss+...@netoyen.net will get to
the same mailbox. both '-' and '+' are supported here, for now. but '-'
is "encouraged" because '+' is not well accepted, as you noticed. so at
some time, '+' support may be removed.

> 
> I assume that the "+" magic is hard-coded in Postfix, so if I [knew what
> I was doing, and] were to dig out the source code, it would be pretty
> simple to change it to use "_" instead of "+".  If I were to upgrade
> this "hack" to something more respectable, I would:
>    1. Create a configurable parameter, rather than hard-coding it

that's recipient_delimiter...

>    2. Allow multiple characters (so I could still use "+" as well)
> 

postfix doesn't support multiple chars in recipient_delimiter. to
understand why, try to read the docs about what lookups postfix does
when it sees foo+...@example.com
it will check:
        foo+...@example.com
        f...@example.com
        example.com (or @example.com ... depending on context)
That's 3 queries. now, if you want two delimiters, say '+' and '-' then
how many queries would
        foo+bar-...@example.com
result in?
        foo+bar-...@example.com
        foo+...@example.com
        f...@example.com
        ...
as you can see, each additional delimiter adds one query...



Reply via email to