On 11/16/2012 2:30 PM, Gerald Vogt wrote: > Hi! > > Most of our servers are set up as null client and sent all through our > mail relays. > > myhostname = hostname.example.com > relayhost = $mydomain > inet_interfaces = loopback-only > mydestination = > > However, I have one server which should work the same except for one > specific mailbox which should be delivered locally, i.e. all mails go > through the relayhost except one address (account or account@localhost > or acco...@hostname.example.com). > > So far I haven't found a way how to do this except resetting > mydestination to the default ($myhostname, localhost.$mydomain, > localhost) and setting forwards for all other addresses except the > account@ address. > > Is there any better way to do this? I.e.: > > 1. deliver mails to account locally. > 2. forward all local mails for any other account to relayhost
# main.cf mydestination = localhost virtual_alias_maps = hash:/etc/postfix/virtual # virtual acco...@example.com account@localhost > > and ideally > > 3. accept mails for acco...@hostname.example.com through smtp from remote > 4. reject any other email for any other address through smtp from remote. # main.cf inet_interfaces = all smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipients reject # recipients acco...@example.com OK References: http://www.postfix.org/documentation.html http://www.postfix.org/STANDARD_CONFIGURATION_README.html http://www.postfix.org/SMTPD_ACCESS_README.html -- Noel Jones