Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postfix Relay Transport Map

Status
Not open for further replies.

boote

Programmer
Jun 29, 2006
3
KE
I am trying to set up Postfix as a mail firewall in front of a MS Exchange Server.

I have one entry in the TRANSPORT file which reads

exampledomain.com smtp[mailserver.example.com]

or I try

exampledomain.com smtp[ipaddressofmailserver.com]

Both of these give an error e.g. [mailserver.example.com] "]" is followed by garbage.

If I use

exampledomain.com smtp:mailserver.example.com

I get an error that the smtp server must be yield a valid ip address.

If I use

exampledomain.com mailserver.example.com:25

I get no error but the mail goes nowhere that I can find.

I am running this under FreeBSD. The mailserver.example.com is resolvable and pingable. I am using private IP addresses eg. 192.168.0.x while I debug. Could this be a reason?

The only other thing I can think of is that I have installed and reinstalled Postfix twice maybe I have a version mixup. If this could be how do I completely uninstall Postfix before trying again.

Any help will be very much appreciated.
 
Was there a colon when you said "smtp[mailserver]", or was that a typo?

There should always be a colon after the method, like so:

smtp:[mailserver]
smtp:[ip.address]
smtp:mx.record

Without the brackets Postfix performs an MX lookup. With them it uses the A record or IP address, and I'm pretty sure a hosts record would also work.

If all mail is to be sent to your Exchange server, then a relayhost entry in main.cf might be just as good.
 
Thanks for speedy reply. Yes that is a typo-sorry! The actual entry is

exampledomain.com smtp:[ipaddressofmailserver]

and that is what gives the error. I'd tried a lot of combinations before I made the post and must have been a bit punch drunk!


 
Are there any characters after the "]"? Try opening the file with vi, moving to the line in question, and pressing "$" to move to the end.
 
I had checked out the entry with vi, and even had a hex editor on it to try and find the supposed garbage characters, but to no avail.

However I decided to try your suggestion about the relayhost entry and that worked fine. I've copied that config over to the production box and will try later to find what was wrong with the transport entry.

Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top