[Dovecot] Recipient delimiters, deliver and SQL databases
Marshal Newrock
marshal at idealso.com
Sun Dec 10 08:20:13 UTC 2006
On Sat, 09 Dec 2006 20:11:19 +0100
Nils Vogels <nivo at is-root.com> wrote:
> >> Now, I am pretty sure the problem lies with the %u, expanding to
> >> user+test at mydomain, which in some way should become user at mydomain,
> >> since the latter is the actual mailbox name of the user, but: how?
> >>
> >
> > Check the postfix setting recipient_delimiter.
> >
> vm-mail# postconf recipient_delimiter
> recipient_delimiter = +
> vm-mail# postfix reload
> postfix/postfix-script: refreshing the Postfix mail system
> vm-mail# echo "Test8" | mail user+test at mydomain
> .. results in a bounce, since user+test at mydomain is not a valid
> mailbox name, user at mydomain is.
>
> Is there any macro (such as %u) that expands to *JUST* the local user
> part of an e-mail address ?
In my system, there is a file called variables.txt
in /usr/share/doc/dovecot. %n should just be the user part, as %d is
the domain part, so "%n@%d" would still be the full email address. If
%n would still be "user+test" (I don't know if this is the case) then
perhaps there should be an additional modifier which strips out
everything between a certain character and @. Meanwhile, it's possible
to simulate this in the query. In MySQL, the query would be something
like "WHERE email=CONCAT(SUBSTRING_INDEX('%u', '+', 1), '@', '%d')"
--
Marshal Newrock
Ideal Solution, LLC - http://www.idealso.com
More information about the dovecot
mailing list