So, I have two servers, I will call then Internal and External.
When I send emails within Internal postfix, it gets relayed by External which does the job of actually sending the email. Normal relay, works great:
sendmail on External -> go to destination sendmail on Internal -> go to External -> go to destination
I have an aliases file which defines a small list of equivalences on both servers. The main email that I want to alias is 'root'. That works to some extend, that is, I receive all emails sent to the root user from either Internal or External.
The aliases on External is:
root: firstname.lastname@example.org, email@example.com
The aliases on Internal is:
Yet user2 receives root email from Internal and External.
Is there a way to forward root emails sent by Internal to only firstname.lastname@example.org and not both user1 & email@example.com?
I try the .forward feature instead and that did not help either. firstname.lastname@example.org are still forwarded as such and thus distributed to all the managers of the External server when they should not be.
There is an example of an unwanted email Received, From and To fields:
Received: from halk.m2osw.com (162-226-130-121.lightspeed.frokca.sbcglobal.net [126.96.36.199]) by mail.m2osw.com (Postfix) with ESMTP id 50BD6CE2253 for <email@example.com>; Tue, 1 Oct 2013 08:18:27 -0700 (PDT) Received: by halk.m2osw.com (Postfix, from userid 0) id 0443B4C009F; Tue, 1 Oct 2013 08:18:26 -0700 (PDT) From: Anacron <firstname.lastname@example.org> To: email@example.com
There are some of the Internal main.cf file (i.e. halk.m2osw.com):
myhostname = halk.m2osw.com mydestination = halk, halk.m2osw.com, localhost.m2osw.com, localhost masquerade_domains = m2osw.com relay_domains = halk.m2osw.com alias_maps = hash:/etc/postfix/aliases alias_database = hash:/etc/postfix/aliases