LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-15-2011, 03:12 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 718

Rep: Reputation: 39
Configuring sendmail to relay messages to a e-mail gateway


Hi there --

We have a sendmail server located in a DMZ that has normally been able to send SMTP traffic to whatever destination is listed in the address of any given e-mail message.

A recent change in network configuration has introduced an e-mail gateway that all servers need to send smtp traffic to in order for the messages to go out to the Internet. I am not familiar with how to configure sendmail to relay traffic to the gateway, and I was hoping someone could lend a hand here.

Thanks.
 
Old 06-15-2011, 04:17 PM   #2
MensaWater
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,028
Blog Entries: 5

Rep: Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790Reputation: 790
Is the "gateway" actually a "relay" server?

If so you just need to set that as your relay host.

In /etc/mail/sendmail.mc find the line that has SMARTHOST in it.
For example:
dnl define(`SMART_HOST', `localhost')dnl

Remove the leading dnl (this says "do not load" and is the equivalent of a #/comment in shell script files).
Put the name of the gateway server there instead of what might be there (e.g. replace localhost in my example).
Run make -C /etc/mail to update your sendmail files (assuming this is in /etc/mail). This updates all files from the source files. Note that for RHEL/CentOS you have to have both the sendmail and sendmail.cf packages installed for this to work. Not sure about other distros.

The make will created a new sendmail.cf from the sendmail.mc and in the cf file you'll see a line that starts with "DS" and is followed by the relay host you specified above.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Sendmail: Relay Messages to Ext. SMTP Server? JmaJeremy Linux - Server 2 02-10-2010 12:59 PM
Setting Up Mail Relay - Sendmail or Other? weisdaclick Linux - Software 2 09-01-2009 03:39 PM
Using sendmail to relay mail to ISP mail server Swift&Smart Linux - Software 26 11-09-2008 04:00 PM
Sendmail as a relay gateway Beamzz Linux - Server 1 04-22-2008 04:06 AM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 05:54 PM


All times are GMT -5. The time now is 12:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration