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:
        [email protected]    [email protected]

  valias:
        [email protected]    [email protected]

The headers will read "[email protected]", but the envelope recipient
for delivery (virtual(5) happens after canonical(5)) will still be
[email protected]. 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 [email protected] (on a server running sendmail) shows up on my system as being to both [email protected] AND [email protected] . - email to [email protected] (my email address on the groupwise server, which started this whole mess) shows up as to [email protected].

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:
        [email protected] [email protected]

Here is my virtual alias:
        [email protected] [email protected]

For this test, I have disabled the procmail recipe.

Any ideas on what I'm doing wrong?

Thanks.

Daniel

Reply via email to