LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-27-2009, 12:33 AM   #1
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Rep: Reputation: 15
Postfix as SMTP relay to exchange help


Can anyone help? I have a linux box on my DMZ with postfix on it. I have exchange on our internal LAN on 10.152.0.104.

I edited main.conf in /etc/postfix and made these ammendments:

myhostname = mail.premiereit.com.au
mydomain = premiereit.com.au
myorigin = $mydomain
inet_interfaces = 203.38.180.211
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 203.38.180.193/224, 10.152.0.0/24
relay_domains = 10.152.0.104
home_mailbox = Maildir/


This doesn't work. Can anyone give me a clue?

Thanks
 
Old 07-27-2009, 02:14 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I have also set up postfix as a relay server and the first difference I notice is that you set the relay_domain to you LAN. the relay_domain parameter indicates what domains you are relaying for. In your case you'll be relaying for your LAN? I imagine it should be your external network that sends to your postfix server which in his turn has to relay it to the LAN (Exchange).
I'll provide my setup which is functional and relays all mails sent to srvnagios to our Google Mail domain without any problems.
Code:
myhostname = srvnagios.ourdomain.es
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = smtp.gmail.com, localhost, srvnagios.ourdomain.es
relayhost = 
mynetworks = 172.25.0.0/16,127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = localhost,172.25.192.35
canonical_maps = hash:/etc/postfix/canonical
relay_domains = srvnagios.ourdomain.es
Notice that relay_domains is set only to srvnagios, meaning that only mail directed to this server gets relayed to smtp.gmail.com.

Also check if your Exchange allows relaying from your postfix server.

Hope this helps you out.

Kind regards,

Eric

Last edited by EricTRA; 07-27-2009 at 02:15 AM. Reason: Added line
 
Old 07-27-2009, 02:34 AM   #3
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Hi My Fellow Espanol (my dad is from Barcelona )

Thankyou for this, Ill try it and give it a go. I see a few difference between your config and mine, am I missing something I should be adding also?

And another thing, the mynetworks field, am I correct in placing both the DMZ and local LAN IP in there?
 
Old 07-27-2009, 02:53 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hola,

Que tal?

I'm not Spanish, I'm from Belgium but I do work in Barcelona and live in Terrassa.

If you don't have local mail accounts on the relay server than it should suffice to only put the DMZ in the mynetworks variable. In my config I have it this way because it's my monitoring server and the monitoring process uses a local account to mail the alerts.

Let me know if you get it working,

Un saludo y hasta luego,

Eric
 
Old 07-27-2009, 06:22 AM   #5
dxangel
Member
 
Registered: Nov 2008
Location: London, UK
Distribution: CentOS, RedHat, Ubuntu
Posts: 79

Rep: Reputation: 18
Dude,

not a good idea to post real IP addresses and hostnames to a public forum!!!
 
Old 07-27-2009, 06:52 PM   #6
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
hi dxangel, its not the correct hostnames, changed them for the purpose of this post. THE wan IP is well secured
 
Old 07-29-2009, 09:10 PM   #7
GGlinux
LQ Newbie
 
Registered: Oct 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Hi Electrica,

Ive been doing a lot of reading on this and I will be configuring this today and tomorrow. I hope you are available for some walkthrough help. Ill let you know as issues arise.

Thanks once again. Viva barca!
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix SMTP 554 -- how do I relay mail? fultron Linux - Software 1 01-28-2009 04:01 PM
Exchange and PostFix Relay: Masquerading NSInc Linux - Newbie 1 02-21-2007 05:14 PM
Postfix smtp relay issue aaf Linux - Software 3 11-22-2006 01:34 PM
sendmail to relay smtp to exchange inaki Linux - Software 1 04-02-2006 08:36 AM
sasl/postfix smtp relay problems 5teve-o Red Hat 0 04-02-2005 03:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration