<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; sendmail</title> <atom:link href="http://www.ghacks.net/tag/sendmail/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Make Sendmail accept mail from external sources</title><link>http://www.ghacks.net/2009/06/05/make-sendmail-accept-mail-from-external-sources/</link> <comments>http://www.ghacks.net/2009/06/05/make-sendmail-accept-mail-from-external-sources/#comments</comments> <pubDate>Fri, 05 Jun 2009 17:17:07 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Email]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[mail server]]></category> <category><![CDATA[sendmail]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2009/06/05/make-sendmail-accept-mail-from-external-sources/</guid> <description><![CDATA[When you&#8217;re setting up servers the last thing you want to have to do is put in an all nighter in order to get Sendmail accepting email from outside of your local network. If you&#8217;re new to Linux this can be a real nightmare. The good news is once this is configured, it&#8217;ll just keep [...]]]></description> <content:encoded><![CDATA[<p>When you&#8217;re setting up servers the last thing you want to have to do is put in an all nighter in order to get Sendmail accepting email from outside of your local network. If you&#8217;re new to Linux this can be a real nightmare. The good news is once this is configured, it&#8217;ll just keep on working until you take it down. But getting Sendmail to the point where it is working correctly can be a real nightmare.</p><p>In this article I will give you a step by step setup for getting Sendmail to accept email from outside of localhost and your own LAN. This will require you to manually edit some configuration files and you will need root access (or sudo access) in order to do this.</p><p><span
id="more-13330"></span>In order for this to work I am going to assume you have your own domain name. For the sake of this article we&#8217;ll illustrate with the sample domain www.sampledomain.com. I will also assume this FQDN is working properly and you have Sendmail already installed and starts properly. The operating system I am using for this example is Ubuntu Server 8.10. With that in mind, let&#8217;s get to this.</p><p><strong>/etc/mail<br
/> </strong></p><p>All of the configurations you will be doing will be within the <strong>/etc/mail</strong> directory. In this directory you will be modifying the following:</p><ul><li>sendmail.cf</li><li>sendmail.mc</li><li>access</li><li>local-host-names</li></ul><p>Once all of the modifications are made you will then restart Sendmail.</p><p><strong>sendmail.mc</strong></p><p>By default Sendmail is setup to only accept mail from localhost. This is the first change that needs to be made. This change is made in the sendmail.mc file. What you are looking for is the following line:</p><p><code>DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Addr=127.0.0.1, Port=smtp')dnl<br
/> </code><br
/> The line needs to be altered to look like:</p><p><code>DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp')dnl</code></p><p>The <em>Addr=127.0.0.1 </em>section instructs Sendmail to only accept email from localhost.</p><p>Now you need to add these changes to the <strong>sendmail.cf </strong>file by issuing the command:</p><p>sudo make -C /etc/mail</p><p>This will add your changes. The reason I use <strong>sendmail.mc</strong> for these options is that configuring the DAEMON_OPTIONS is a bit confusing and hard to find. The other options are quite easy to add directly to <strong>sendmail.cf.</strong></p><p><strong>sendmail.cf</strong></p><p>The options you will want to add in this file are for setting your domain name.  The first option is under the &#8220;my official domain name&#8221; heading. What you will see in the example is:</p><p><em>#Dj$w.Foo.Com</em></p><p>replace this with (and remember we&#8217;re using our sample domain):</p><p><em>Djsampledomain.com</em></p><p>The next option will be set for masquerading. In some recent Sendmail releases this is not in the <em>cf </em>by default. Take a look for the quoting section that looks like:</p><p><code># dequoting map<br
/> Kdequote dequote<br
/> # class E: names that should be exposed as from this host, even if we masquerade<br
/> # class L: names that should be delivered locally, even if we have a relay<br
/> # class M: domains that should be converted to $M<br
/> # class N: domains that should not be converted to $M<br
/> #CL root</code></p><p>At the bottom of this add:</p><p><code># who I masquerade as (null for no masquerading) (see also $=M)<br
/> DMsampledomain.com</code></p><p>Now you are done with the <strong>sendmail.cf</strong> file.</p><p><strong>access</strong></p><p>This file defines access control to your mail server. For our sample we will add the following to the bottom of this file:</p><p><code>sampledomain.com<br
/> www.sampledomain.com<br
/> mail.sampledomain.com</code></p><p>Save that file and you have one more configuration to take care of.</p><p><strong>local-host-names</strong></p><p>This file will define the host names associated with your Sendmail server. In this file we will add:</p><p><code>sampledomain.com<br
/> mail.sampledomain.com</code></p><p><strong>Restart Sendmail</strong></p><p>It is now time to restart Sendmail. Do this with the command:</p><p><em>/etc/init.d/sendmail reload</em></p><p>Once sendmail restarts you should be accepting email from the outside world. Run a test with an email address outside of your domain.</p><p><strong>Final thoughts</strong></p><p>Sendmail isn&#8217;t really as difficult as it is made out to be. With this simple walkthrough you should have Sendmail accepting mail from all over quickly and easily.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/06/05/make-sendmail-accept-mail-from-external-sources/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
