[TriLUG] postfix is driving me nuts

Timothy A. Chagnon tchagnon at futeki.net
Wed Jun 22 17:08:19 EDT 2005


On Wed, 2005-06-22 at 13:15, Michael Alan Dorman wrote:
> I suspect you want to use a sender_canonical_maps setup.  `man
> canonical` has a pretty complete reference.

Yeah, this was the right track.  Actually needed
recipient_canonical_maps not sender.  I figured out eventually that
these are looked at by the cleanup daemon right when the mail is
received.  The aliases map is only looked at if the mail is delivered to
the local(8) daemon, which wasn't happening some times due to the
hostname/myorigin mismatches.

Also had to put in a line for each host for that ugly daemon that likes
to send to user@`hostname`.  Basically one line for each:
@hostN.local @myorg.tld

Then since the canonical maps are recursive, it will go back through and
catch any lines that read like:
user realEmail at isp.tld

Also a catch-all for root,postmaster,etc since aliases isn't used to
change these:
@myorg.tld log_address at bigorg.tld

In main.cf I only needed the following non-default settings:
inet_interfaces = localhost
mynetworks_style = host
myorigin = myorg.tld
recipient_canonical_maps = hash:/etc/postfix/recipient-canonical
relayhost = [smtp.bigorg.tld]

If anyone knows how to make regular expressions work in the canonical
maps, that would be helpful so I don't have to list each of those
hostnames individually.  I tried it a couple different ways, but it
wouldn't work.

Thanks,
Tim

-- 
Timothy A. Chagnon
Linux, how do I love thee?
Let me count the ways:
while(1){count++;}




More information about the TriLUG mailing list