Hi Wietse, On 25/03/2010, at 8:59 AM, Wietse Venema wrote:
> See http://www.postfix.org/ADRESS_REWRITING_README.html, option > address masquerading. So that is what I was trying to use. The problem with this is that to get it to work the way I (think) I want it to work, I need to do the following.. hang on, let me first clearly define what I’m trying to do fully, then show my current configuration. * all mail to be sent on to a relayhost regardless of whether the local MTA thinks it should be delivered locally or not. (this is the specfic issue I currently have) * all mail to be rewritten in the form $lo...@$mydomain (preferrably in that generic manner, rather than having to put @domain.com in the configuration file. (masquerade works fine for all cases except the case where a user is sending mail explicitly to $lo...@$myhostname or just $local - this mail is delivered locally, not what I’m after) * the root mail to appear from r...@$myhostname (solved by using masquerade_domains and masquerade_exceptions) * I would also like to not have to localise this configuration file in any way (by explicitly specifying the hostname and preferrably by not specifying the local domain and using the discovered domain) So, to do this, here’s what I’ve done so far: inet_interfaces = loopback-only masquerade_domains = $mydomain masquerade_exceptions = root, mailer-daemon myorigin = $myhostname relayhost = mail Other than that, it’s a standard RHEL5 postfix configuration. I tried to use luser_relay, however, it doesn’t support the form luser_relay = $lo...@$mydomain ($mydomain is not expanded) and testing $lo...@domain.com shows that it only redirects global mail aliases but not user account names as they are found locally (as per the specification) >> I could not see the ExposeRoot type functionality that Sendmail >> had. Does that exist? (I know I could have a sender_canonical_map >> but I don_t see a way to generalise having root being exposed >> without explicitly entering the hostname and therefore editing >> files for every system) > > See "delivering some addresses locally", in the > STANDARD_CONFIGURATION_README. I don’t want to deliver any addresses locally in this configuration. At all. I’m using /etc/aliases to redeliver root mail to another address, but if what I am desiring above would work, I could just have a single alias on the mail hub for root instead of on each host. cheers, James