View Full Version : Mail relay "store and forward" configuration, reccomended solution?
woleium
26th January 2007, 17:08
Hi again. Firstly, thanks for being so helpful with my last problem. Once again I have read every post that relates to this and can't find a straight answer :(
We have finally migrated all of our sites to ISPConfig now, yay!
One of our customers wants to configure his mx records as so:
MX 10 [ISPCONFIG]
MX 20 [IP OF ONSITE ADSL LINK]
Then configure ispconfig to (viruscheck &) relay all mail to the [IP OF ONSITE ADSL LINK]
What would the best way to do this be? I have read about procmail recipies, postfix relay configs, and things related to ISPConfig settings.
The more I read, the more I get confused, so any pointers would be hugely appreciated.
W.
falko
27th January 2007, 14:28
I'd leave out the MX 20 [IP OF ONSITE ADSL LINK] part, then configure amavisd for virus and spam scanning on the ISPConfig server and use Postfix transports to deliver the mails to the second server.
woleium
28th January 2007, 02:07
Cool, thanks again Falko.
For the benefit of others & for clarification, you are suggesting adding the following to
/etc/postfix/transport
example1.com [IP OF ONSITE ADSL LINK]
source (http://www.knowplace.org/pages/howtos/smtp_gateway_for_multiple_domains_with_postfix.php #transport)
falko
29th January 2007, 12:06
Yes, right. :)
woleium
5th February 2007, 16:19
possibly add these to the faq?
1. From inside ISPConfig make sure that email is configured to external mailserver for the domain, and also any subdomains (subdomains tab -> other)
2. from shell:
echo "relay_domains = /etc/postfix/relay" >> /etc/postfix/main.cf
echo "[DOMAIN NAME HERE]" >> /etc/postfix/relay
echo "[DOMAIN NAME HERE] smtp:[IP ADDRESS TO FORWARD TO] >> /etc/postfix/transport
postmap /etc/postfix/transport
postfix reload
to add additional domains:
echo "[DOMAIN NAME HERE]" >> /etc/postfix/relay
echo "[DOMAIN NAME HERE] smtp:[IP ADDRESS TO FORWARD TO] >> /etc/postfix/transport
postmap /etc/postfix/transport
postfix reload
Hope this helps someone, it took me a couple of days to figure it out.
Madlew2007
20th February 2007, 00:10
Just what i needed ty :)
Madlew2007
20th February 2007, 08:58
I have this setup and postfix relays the emails fine to my exchange server but the mails dont seem to be getting scanned through spamassassin.
Do i need to teach spamassassin? e.g setup a local mailbox and fill with spam/ham?
The domain is flagged for av and spam scanning in ISPConfig.
What can I check?
martinfst
20th February 2007, 09:12
mailscanning in ISPConfig is done with procmail, which is called as the last step in Postfix. Your relaying is done before procmail is called, thus ISPConfig can never scan the emails on the primary MTA. You would need a totally different Postfix setup if you want to scan the mails before relaying. Which would break ISPConfig.
Madlew2007
21st February 2007, 19:56
Ok, thank you for your reply.
I think im gonna try setting up Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) as I have read the scanning/relaying threads which point to this.
Hope this does what I need.
DiOmega
3rd April 2007, 18:30
mailscanning in ISPConfig is done with procmail, which is called as the last step in Postfix. Your relaying is done before procmail is called, thus ISPConfig can never scan the emails on the primary MTA. You would need a totally different Postfix setup if you want to scan the mails before relaying. Which would break ISPConfig.
Is there any possibility to relay mail after scanning (e.g. with procmail recipes)?
falko
4th April 2007, 13:57
You could implement amavisd into Postfix: http://www.howtoforge.com/amavisd_postfix_debian_ubuntu
vBulletin® v3.8.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.