Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Tips/Tricks/Mods

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th January 2007, 18:08
woleium woleium is offline
Junior Member
 
Join Date: Sep 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Mail relay "store and forward" configuration, reccomended solution?

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:
Code:
    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.
Reply With Quote
  #2  
Old 27th January 2007, 15:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
Default

I'd leave out the
Code:
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.
__________________
Falko
--
Follow me on:
Reply With Quote
  #3  
Old 28th January 2007, 03:07
woleium woleium is offline
Junior Member
 
Join Date: Sep 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Smile

Cool, thanks again Falko.

For the benefit of others & for clarification, you are suggesting adding the following to

/etc/postfix/transport

Code:
	example1.com              [IP OF ONSITE ADSL LINK]
source

Last edited by woleium; 29th January 2007 at 19:32.
Reply With Quote
  #4  
Old 29th January 2007, 13:06
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,853
Thanks: 781
Thanked 1,558 Times in 1,477 Posts
Default

Yes, right.
__________________
Falko
--
Follow me on:
Reply With Quote
  #5  
Old 5th February 2007, 17:19
woleium woleium is offline
Junior Member
 
Join Date: Sep 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up Full Instructions

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:
Code:
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:

Code:
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.

Last edited by woleium; 5th February 2007 at 17:22.
Reply With Quote
  #6  
Old 20th February 2007, 01:10
Madlew2007 Madlew2007 is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Question

Just what i needed ty

Last edited by Madlew2007; 20th February 2007 at 02:18.
Reply With Quote
  #7  
Old 20th February 2007, 09:58
Madlew2007 Madlew2007 is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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?
Reply With Quote
  #8  
Old 20th February 2007, 10:12
martinfst martinfst is offline
Senior Member
 
Join Date: Dec 2006
Location: Hilversum, The Netherlands
Posts: 873
Thanks: 1
Thanked 14 Times in 13 Posts
Send a message via MSN to martinfst Send a message via Skype™ to martinfst
Default

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.
Reply With Quote
  #9  
Old 21st February 2007, 20:56
Madlew2007 Madlew2007 is offline
Junior Member
 
Join Date: Feb 2007
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #10  
Old 3rd April 2007, 19:30
DiOmega DiOmega is offline
Junior Member
 
Join Date: Feb 2006
Posts: 23
Thanks: 3
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by martinfst
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)?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:26.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com

Red Hat Virtual Experience - a free virtual event. Dec. 9th