LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-02-2014, 02:19 PM   #1
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Rep: Reputation: 30
Postfix relay thru Exchange


Having trouble wrapping my head around sending notifications from linux box to us windows users. If I try to telnet to our public ip for our exchange server I get connection refused which is fine. If I try it by netbios name it works because I have told exchange to allow the linux box. My question is how can I set up postfix correctly so when it wants to send an email to person@publicdomain.com that it uses our internal network and not try to connect externally?
 
Old 09-02-2014, 03:08 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
a.) Save date stamped copy of “main.cf” and “generic” in /etc/postfix.

b.) Modify original main.cf to contain line that has
relayhost = <your exchange relay hostname>
Insure all other relayhost lines are commented out.

Here we use the short name for our servers [set in /etc/sysconfig/network on RHEL]. You can skip remaining steps if you use FQDN names rather than short names.

c.) Modify the end of the main.cf file to have the following:
# Generic mapping due to short name rather than FQDN in /etc/sysconfig/network
# dd-Mmm-CCYY <your ID>
smtp_generic_maps = hash:/etc/postfix/generic

d.) Modify the original “generic” file to have the following at the end:
# Generic mapping due to use of short name rather than FQDN in /etc/network
# dd-Mmm-CCYY <your ID>
@<postfix server hostname.localdomain @<postfix server hostname>.<yourdomain>

e.) Run "postmap /etc/postfix/generic"

f.) Send test emails from servers and verify it comes showing FQDN to you.
 
Old 09-03-2014, 08:40 AM   #3
DigiCrime
Member
 
Registered: Dec 2002
Location: St. Louis
Distribution: All Flavors
Posts: 195

Original Poster
Rep: Reputation: 30
Thanks, was editing the wrong file.
 
  


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
[SOLVED] Configure Postfix to relay to Exchange Server with NTLM authentication viktor1985 Linux - Newbie 13 06-28-2012 08:17 PM
Using postfix to relay to MS Exchange allowing only mail to my domain rsduhamel Linux - Server 3 05-13-2011 11:24 PM
Postfix as SMTP relay to exchange help GGlinux Linux - Server 6 07-29-2009 09:10 PM
Exchange and PostFix Relay: Masquerading NSInc Linux - Newbie 1 02-21-2007 05:14 PM
LXer: Mandriva Postfix Anti-Spam, Anti-Virus Relay Server for Exchange Server 2000/2003 LXer Syndicated Linux News 0 06-29-2006 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:45 PM.

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