Hi,
I have set up a postfix server with spamassassing and ClamAV to filter inbound emails and redirect certain addresses within my domain to an external server like this:
1. All email for anyone@mydomain.com comes to postfix
2. Postfix and friends scan for spam and viruses
3. Postfix readdresses mail for someusers@mydomain.com to someuser@externaldomain.com and forwards everything to scalix
4. Scalix delivers local user emails to their mailboxes and sends the rest out to the external mailservers at other domains
The config I used to do this in postfix main.cf is:
virtual_alias_maps = hash:/etc/postfix/virtual <-- this contains the list that maps user@mydomain.com to realaddress@externaldomain.com
relay_domains = mydomain.com
relayhost = [scalix.mydomain.com]
I would like to reduce the load on the Scalix server by having postfix send the readdessed mails straight back out to the Internet rather than via Scalix. Right now they go to Scalix because postfix seems to base its relaying decision on the original address not the re-written one. Example from maillog file on the postfix server:
Apr 23 12:01:01 relay postfix/smtp[15873]: 7DABF2C74D: to=<user@externaldomain.com>, orig_to=<user@mydomain.com>, relay=scalix.mydomain.com[192.168.20.9]:25, delay=0.92, delays=0.08/0.03/0.01/0.8, dsn=2.0.0, status=sent (250 Ok)
Does anyone know the correct postfix config to achieve this and not have all the mails go via Scalix?
Thanks very much in advance for any help you can offer
Matt