I have different forwarding needs for different domains, which all point to my mail-server:
[email protected] [email protected]
[email protected] [email protected]
@example.com mylocalaccount
This all works... However, some of these users wish to use the +-notation to give different vendors different addresses, such as user1
+vendor@example.com
. And this part is not working -- all such e-mails end up delivered to the catchall mylocalaccount
instead of being forwarded properly.
How do I make [email protected]
be forwarded to the same destination as [email protected]
?
I tried adding entries like
user1+*@example.com foo+%[email protected]
but that didn't fix the problem...
Here are the debug-traces:
Without the detail:
% sendmail -d60.5 -bv [email protected]
map_lookup(dequote, me, %0=me) => NOT FOUND (0)
map_lookup(dequote, g, %0=g) => NOT FOUND (0)
map_lookup(virtuser, [email protected], %[email protected], %1=g) => [email protected] (0)
... works.
With the detail:
% sendmail -d60.5 -bv [email protected]
map_lookup(dequote, me, %0=me) => NOT FOUND (0)
map_lookup(dequote, g+meow, %0=g+meow) => NOT FOUND (0)
map_lookup(virtuser, [email protected], %[email protected], %1=g+meow) => NOT FOUND (0)
map_lookup(virtuser, @example.com, %[email protected], %1=g+meow) => me (0)
map_lookup(dequote, me, %0=me) => NOT FOUND (0)
map_lookup(user, me, %0=me) => me<> (0)
[email protected]... deliverable: mailer local, user me
... does not work -- comes to the catch-all local account "me".
If you want to virtusertable to redirect with +detail preserved then try:
Debug procedure
As root execute
sendmail -d60.5 -bv [email protected]
.It should trace map lookups including virtusertable map lookups.
Try
sendmail -d21.12 -d60.5 -bv [email protected]
if +detail is stripped before virtusertable lookups.[email protected]
by default should make sendmail look for the following virtusertable enries:[email protected] (plus present but detail empty) conducts lookups 1+3+4+6+7
[email protected] (no +detail present) condutcs lookups 4+7
It seems that
+
is missing inOperatorChars
in yoursendmail.cf
. It makesR
lines insedmail.cf
see one tokenuser+detail
instead of three tokensuser
+
detail
.sendmail.cf
generated fromsendmail.mc
should set OperatorChars to.:%@!^/[]+
by default accoding to the bat book. It may be changed in mc file by definingconfOPERATORS
.Check what is reported by
grep OperatorChars /etc/mail/sendmail.cf