Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th June 2007, 16:56
ariek ariek is offline
Junior Member
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default Postfix relay for Exchange

Code:
    1.            2.                 3.                    4.
INTERNET <==>| IIS-SMTP |<==>| PF/RELAY/SPAMCNTRL |<==>|EXCHANGE |
PF/IMAP/SQ     ADmember           Postfix MX?              MX?
           iis.domain.com    postfix.domain.com    mail.domain.com
Hi,

Above is my mail config. It's not exactly the ideal situation(...). 1, 2 & 4 are working, and dealing with loads of mail, so there's no problem. Part 3 has to take part to fight spam, and control and visualise amounts (mailgraph). There are a few things I can not find any answers for, so hopefully someone can help me out.

- The easiest way would be to just relay all mail with destination domain.dom in the order 1->2->3->4;
- The reply order should be 4->3->2->1;

1. How do I have to configure the relay part? After reading many pages I concluded that user (ie. SMTP address) authentication is nessessary for Postfix, otherwise it will just not work. Is this a fact?
There is an easy way to configure authentication with a perl script to check all Active Directory SMTP addresses: http://www-personal.umich.edu/~malth/gaptuning/postfix/
2. With the method discribed above I managed to replicate this in a test environment from 1 - 4 without a problem. Internet in the test environment is in this case another Postfix/CourierIMAP/Squirrelmail server with a few fake domains.
3. The problem starts when I reply as an Exchange user. The message stops at point 3 with the message: status=bounced (Host or domain name not found. Name service error for name=internet.test type=AAAA: Host not found.) The message is quite logic, because the host does not exist. So here we get to the point.
4. How can I let all mail from 4, relay via 3 to 2? Or, maybe even better, how can I create a transparent relay server?.

The extra options I configured for the Postfix server of number 3.
Code:
mydomain = test.lan
myorigin = $mydomain
#relay_transport = smtp:[testiis.test.lan]
relay_domains = test.lan
relay_recipient_maps =  hash:/etc/postfix/ad_users
                        hash:/etc/postfix/ad_users2
                        hash:/etc/postfix/pf_users
show_user_unknown_table_name = no

I know it's quite a story, but I couldn't find another way to tell it.

Thanx.

Last edited by ariek; 20th June 2007 at 23:53.
Reply With Quote
Sponsored Links
  #2  
Old 21st June 2007, 16:49
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by ariek
1. How do I have to configure the relay part? After reading many pages I concluded that user (ie. SMTP address) authentication is nessessary for Postfix, otherwise it will just not work. Is this a fact?
Take a look here:
http://www.howtoforge.com/postfix_re...her_mailserver

Quote:
Originally Posted by ariek
3. The problem starts when I reply as an Exchange user. The message stops at point 3 with the message: status=bounced (Host or domain name not found. Name service error for name=internet.test type=AAAA: Host not found.) The message is quite logic, because the host does not exist. So here we get to the point.
You could add internet.test to /etc/hosts, if there's no DNS record for it.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st June 2007, 21:03
ariek ariek is offline
Junior Member
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Default

Falko, thanks for the reply.
Quote:
You could add internet.test to /etc/hosts, if there's no DNS record for it.
Of course I could add that particular domain, but that's unfortunatly not possible with all the other domains I will have to reply to in the future
I'm afraid that your howto will not work in my case, because of its different setup, also combined with Exchange.

The thing I'm realy looking for is a 'transparent' way, to transport e-mail from server 4 to server 2. When I use the option
Code:
relayhost = iis.domain.com
all e-mail will be relayed true that server, ie. nothing will arrive at mail.domain.com.
Hopefully I explained the complexity clearly enough. Do you have any other tips of advise?
Again, many thanks in advance.

Last edited by ariek; 21st June 2007 at 21:07.
Reply With Quote
  #4  
Old 25th June 2007, 05:21
ariek ariek is offline
Junior Member
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

The line I was looking for is:
Code:
transport_maps = hash:/etc/postfix/transport
in main.cf.
In transport you need something like
Code:
domain.com        relay:[mail.domain.com]
where the brackets take care of MX record search.
You also need
Code:
relayhost = testiis.test.lan
to take care of all remaining relaying.
Transport super seeds relayhost.

Together with relay_recipient_maps the Postfix/Exchange picture is complete.
If you don't want to check on users do not mention the domain, in this case domain.com, in mydestination.

Last edited by ariek; 25th June 2007 at 06:18.
Reply With Quote
The Following User Says Thank You to ariek For This Useful Post:
falko (26th June 2007)
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
POSTFIX relay not only local varnik Installation/Configuration 1 10th May 2007 18:06
Issues with Postfix using "Virtual Users And Domains With Postfix, Courier And MySQL" Kyse HOWTO-Related Questions 15 6th January 2007 15:35
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Verify email setup meekish Installation/Configuration 28 27th October 2006 15:36
Bug? (postfix refuses mail, relay access denied) st2xo General 2 31st January 2006 16:00


All times are GMT +2. The time now is 00:22.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.