Begin forwarded message:
On Jul 13, 2009, at 10:42, Victor Duchovni wrote:
On Mon, Jul 13, 2009 at 10:34:00AM -0400, Daniel L'Hommedieu wrote:
main.cf:
# Pick one:
#canonical_maps = hash:/etc/postfix/canonical
#virtual_alias_maps = hash:/etc/postfix/valias
#virtual_alias_domains = ... set me explicitly ...
#
#canonical_maps = cdb:/etc/postfix/canonical
#virtual_alias_maps = cdb:/etc/postfix/valias
#virtual_alias_domains = ... set me explicitly ...
#
#canonical_maps = ldap:/etc/postfix/canonical.cf
#virtual_alias_maps = ldap:/etc/postfix/valias.cf
#virtual_alias_domains = ... set me explicitly ...
canonical:
o...@rab.net f...@bar.edu
valias:
f...@bar.edu o...@rab.net
The headers will read "f...@bar.edu", but the envelope recipient
for delivery (virtual(5) happens after canonical(5)) will still be
o...@rab.net. There are other ways of doing this, but this one is
perhaps the most natural.
Thanks Victor.
FWIW I had tried the canonical map as you suggest (I thought I had
mentioned that), but all that seemed to do was forward the mail
back to the
.edu address, which put the mail into a loop until I removed the
map.
Which is *exactly* why I add the virtual(5) reverse mapping, so that
the envelope recipient is "de-canonicalized". The procmail regexp
recipe
is fragile. Do as you see fit, but I recommend the canonical+virtual
approach.
Hi Victor.
I must be doing something wrong here, because it isn't working as I
expect. Here's what I see happening:
- email to non-groupwise-...@bar.edu (on a server running sendmail)
shows up on my system as being to both non-groupwise-...@bar.edu AND o...@rab.net
.
- email to groupwise-...@bar.edu (my email address on the groupwise
server, which started this whole mess) shows up as to o...@rab.net.
Based on your instructions, here is what I added to my main.cf:
canonical_maps = hash:/etc/postfix/recipient_canonical
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps
virtual_alias_domains = bar.edu
Here is my canonical map:
o...@rab.net f...@bar.edu
Here is my virtual alias:
f...@bar.edu o...@rab.net
For this test, I have disabled the procmail recipe.
Any ideas on what I'm doing wrong?
Thanks.
Daniel
Well, one thing I note is that it is only correcting email that
originates locally. If I send mail to groupwise-...@bar.edu and relay
through my postfix mail server, the mail ends up in the mailbox for o...@rab.net
, correctly addressed "to" groupwise-...@bar.edu. However, if I relay
through bar.edu's SMTP server, then the address is not getting set.
I'm sure that's a setting in main.cf and will start looking for that,
but wanted to give the additional info.
Thanks.
Daniel