<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Bo Wu&#039;s IT Lab &#187; Sendmail</title>
	<atom:link href="http://www.bowu.org/tag/sendmail/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bowu.org</link>
	<description>If winter comes, can spring be far behind?</description>
	<lastBuildDate>Thu, 29 Dec 2011 18:09:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Build your Sendmail Relay Server in your LAN</title>
		<link>http://www.bowu.org/system-administration/linux/sendmail/sendmail-relay-server-in-lan.html</link>
		<comments>http://www.bowu.org/system-administration/linux/sendmail/sendmail-relay-server-in-lan.html#comments</comments>
		<pubDate>Wed, 23 Jun 2010 23:39:59 +0000</pubDate>
		<dc:creator>bo</dc:creator>
				<category><![CDATA[Sendmail]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[lan]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[relay]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[UNIX & Linux]]></category>

		<guid isPermaLink="false">http://www.bowu.org/?p=366</guid>
		<description><![CDATA[I installed a sendmail relay server in my LAN so that other servers can use it to send emails. The following is how I did the configuration in a Ubuntu 9 machine. 1. First you need to install sendmail package. 2. After installation, you need to do the following configuration: (1) Sendmail Master Configuration File: [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.bowu.org/wp-content/uploads/2010/06/sendmail.gif" alt="sendmail Build your Sendmail Relay Server in your LAN" title="sendmail" width="356" height="130" class="alignnone size-full wp-image-396" /></p>
<p>I installed a sendmail relay server in my LAN so that other servers can use it to send emails.  The following is how I did the configuration in a Ubuntu 9 machine.</p>
<p>1. First you need to install sendmail package.</p>
<p>2. After installation, you need to do the following configuration:</p>
<p><strong>(1) Sendmail Master Configuration File: /etc/mail/sendmail.mc</strong></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># vi sendmail.mc</div></div>
<p>To enable relay on a specific IP, you need to change SMTP Daemon&#8217;s IP address.  By default, it is 127.0.0.1 which is your localhost loopback address.  This setting only allows you to send email from localhost.  If you want other servers to use this server as relay to send emails, you much change to a valid IP address in your LAN, for example, it can be 192.168.0.88.  In order to do so, you need to change the line 57 and 59 to as below:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">DAEMON_OPTIONS('Family=inet, &nbsp;Name=MTA-v4, Port=smtp, Addr=192.168.0.88')dnl<br />
DAEMON_OPTIONS('Family=inet, &nbsp;Name=MSP-v4, Port=submission, M=Ea, Addr=192.168.0.88')dnl</div></div>
<p>Please replace 192.168.0.88 with your real IP address.  You also need to change following two lines at 100 and 104:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">LOCAL_DOMAIN('yourhost.yourdomain')dnl<br />
MAILER('smtp')dnl</div></div>
<p>Next step, you need to compile the sendmail.mc file to sendmail.cf file which will be actually used by sendmail.  You need to type:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># m4 /etc/mail/sendmail.mc &gt; /etc/mail/sendmail.cf</div></div>
<p>You need to restart the sendmail server to make the change effective:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># /etc/init.d/sendmail restart</div></div>
<p>To check if the Sendmail is listening on an IP and a specific port, you can type:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># netstat -aunt</div></div>
<p>To check if the SMTP Port is open and listening from another server, you can type:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># nmap -v -sT 192.168.10.10 (IP address of this SMTP server)</div></div>
<p><strong>(2) Configure the Access Control file: /etc/mail/access</strong></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># vi access</div></div>
<p>If you want to allow 192.168.0.99 to relay, add the following line:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Connect:192.168.0.99 &nbsp; &nbsp;RELAY</div></div>
<p>You also need to compile the access file to access.db file.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># makemap hash /etc/mail/access.db &lt; /etc/mail/access</div></div>
<p>You need to restart the sendmail service to make it effective.</p>
<p>3. Sendmail Troubleshooting</p>
<p>If the local domain emails can not be delivered, and if your email service is hosted by an outside ISP, like Gmail (Google App.),  please make sure your DNS setting will let you to resolve the correct MX record.  Usually, you can set the external DNS server as your DNS server.</p>
<p>For example,</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:550px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># vi /etc/resolv.conf<br />
<br />
nameserver 206.0.6.60</div></div>
<p>You need to replace 206.0.6.60 with your real DNS Server&#8217;s IP address provided by your ISP.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bowu.org/system-administration/linux/sendmail/sendmail-relay-server-in-lan.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
