<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>blog.devhen.com - sendmail</title>
    <link>http://blog.devhen.com/</link>
    <description>Linux, Open Source, CentOS, Fedora, Freedom…</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.2.1 - http://www.s9y.org/</generator>
    <pubDate>Tue, 08 Jul 2008 22:27:02 GMT</pubDate>

    <image>
        <url>http://blog.devhen.com/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: blog.devhen.com - sendmail - Linux, Open Source, CentOS, Fedora, Freedom…</title>
        <link>http://blog.devhen.com/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Setup a Spam-Proof Vacation Autoresponder with Procmail + Sendmail</title>
    <link>http://blog.devhen.com/archives/Setup-a-Spam-Proof-Vacation-Autoresponder-with-Procmail-+-Sendmail.html</link>
            <category>CentOS</category>
            <category>Fedora</category>
            <category>HOWTO</category>
            <category>Linux</category>
            <category>sendmail</category>
    
    <comments>http://blog.devhen.com/archives/Setup-a-Spam-Proof-Vacation-Autoresponder-with-Procmail-+-Sendmail.html#comments</comments>
    <wfw:comment>http://blog.devhen.com/wfwcomment.php?cid=178</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.devhen.com/rss.php?version=2.0&amp;type=comments&amp;cid=178</wfw:commentRss>
    

    <author>nospam@example.com (devhen)</author>
    <content:encoded>
    The problem with vacation auto responders like &#039;vacation&#039; for sendmail is that spammers often fake the From: address. Auto responding to these addresses can get your mail server blacklisted. To avoid this you can setup your autoresponder with procmail and, if you are running a spam filter on your machine, you can tell procmail to auto respond only if the X Spam Status header is &#039;No.&#039; To accomplish this copy the following into ~/.procmailrc in the home directory of the user you want auto responses for. Make sure to make any neccessary changes to MAILDIR, SENDMAIL and the three instances of &#039;you@yourdomain.com&#039;:&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;&lt;a href=&quot;http://blog.devhen.com/archives/Setup-a-Spam-Proof-Vacation-Autoresponder-with-Procmail-+-Sendmail.html#extended&quot;&gt;Continue reading &quot;Setup a Spam-Proof Vacation Autoresponder with Procmail + Sendmail&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Tue, 08 Jan 2008 23:09:36 -0700</pubDate>
    <guid isPermaLink="false">http://blog.devhen.com/archives/178.html</guid>
    
</item>
<item>
    <title>HOWTO: Sendmail SMTP Auth</title>
    <link>http://blog.devhen.com/archives/HOWTO-Sendmail-SMTP-Auth.html</link>
            <category>HOWTO</category>
            <category>Linux</category>
            <category>sendmail</category>
    
    <comments>http://blog.devhen.com/archives/HOWTO-Sendmail-SMTP-Auth.html#comments</comments>
    <wfw:comment>http://blog.devhen.com/wfwcomment.php?cid=169</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://blog.devhen.com/rss.php?version=2.0&amp;type=comments&amp;cid=169</wfw:commentRss>
    

    <author>nospam@example.com (devhen)</author>
    <content:encoded>
    These notes are designed to help a Linux geek setup SMTP auth on a Linux + sendmail server. Without proper SMTP auth settings your server is liable to be used by spammers and spam bots to send out copious amounts of unwanted mail. This can get your server&#039;s IP blacklisted and can really eat up your resources. Needless to say, we need to avoid this. Start by editing your &lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;sendmail.mc&lt;/SPAN&gt; file (found in &lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;/etc/mail&lt;/SPAN&gt;). I use the following commands, try replacing the corresponding lines in your mc file with these ones: (Note that lines beginning with &#039;dnl&#039; are essentially considered comments and are ignored)&lt;br /&gt;
&lt;br /&gt;
&lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt; define(`confAUTH_OPTIONS&#039;, `A&#039;)&lt;br /&gt;
dnl&lt;br /&gt;
dnl Accept PLAIN and LOGIN authentications.dnl&lt;br /&gt;
TRUST_AUTH_MECH(`LOGIN PLAIN&#039;)dnl&lt;br /&gt;
define(`confAUTH_MECHANISMS&#039;, `LOGIN PLAIN&#039;)dnl&lt;br /&gt;
&lt;/SPAN&gt;&lt;br /&gt;
&lt;br /&gt;
Now you need to rebuild your sendmail.cf file from the .mc file you&#039;ve just edited:&lt;br /&gt;
&lt;br /&gt;
&lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;make sendmail.cf -C /etc/mail&lt;/SPAN&gt;&lt;br /&gt;
&lt;br /&gt;
Next we need to make sure saslauthd is running and configured correctly. Edit your saslauthd configuration file (&lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;/etc/sysconfig/saslauthd&lt;/SPAN&gt;) and replace &lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;shadow&lt;/SPAN&gt; with &lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;pam&lt;/SPAN&gt; for the &lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;MECH&lt;/SPAN&gt; variable like so:&lt;br /&gt;
&lt;br /&gt;
&lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt; # Mechanism to use when checking passwords.  Run &quot;saslauthd -v&quot; to get a list&lt;br /&gt;
# of which mechanism your installation was compiled to use.&lt;br /&gt;
MECH=pam&lt;br /&gt;
&lt;/SPAN&gt;&lt;br /&gt;
&lt;br /&gt;
Restart sendmail and saslauthd&lt;br /&gt;
&lt;br /&gt;
&lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt; /etc/rc.d/init.d/sendmail restart&lt;br /&gt;
/etc/rc.d/init.d/saslauthd restart&lt;br /&gt;
&lt;/SPAN&gt;&lt;br /&gt;
&lt;br /&gt;
and don&#039;t forget to configure your email clients to use authentication when sending outgoing mail.&lt;br /&gt;
&lt;br /&gt;
For more information and some tips on installing a certificate for secure SMTP connections, try this article:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.madboa.com/geek/sendmail-auth/&quot;&gt;http://www.madboa.com/geek/sendmail-auth/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Read on for a full copy of my sendmail.mc file.&lt;br /&gt;
&lt;br /&gt;
&lt;!--more--&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;SPAN STYLE=&quot;font-family: monospace&quot;&gt;divert(-1)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # This is the sendmail macro config file for m4. If you make changes to&lt;br /&gt;
dnl # /etc/mail/sendmail.mc, you will need to regenerate the&lt;br /&gt;
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is&lt;br /&gt;
dnl # installed and then performing a&lt;br /&gt;
dnl #&lt;br /&gt;
dnl #     make -C /etc/mail&lt;br /&gt;
dnl #&lt;br /&gt;
include(`/usr/share/sendmail-cf/m4/cf.m4&#039;)dnl&lt;br /&gt;
VERSIONID(`setup for Red Hat Linux&#039;)dnl&lt;br /&gt;
OSTYPE(`linux&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # default logging level is 9, you might want to set it higher to&lt;br /&gt;
dnl # debug the configuration&lt;br /&gt;
dnl #&lt;br /&gt;
dnl define(`confLOG_LEVEL&#039;, `9&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # Uncomment and edit the following line if your outgoing mail needs to&lt;br /&gt;
dnl # be sent out through an external mail server:&lt;br /&gt;
dnl #&lt;br /&gt;
undefine(`SMART_HOST&#039;)&lt;br /&gt;
dnl #&lt;br /&gt;
define(`confDEF_USER_ID&#039;,``8:12&#039;&#039;)dnl&lt;br /&gt;
dnl define(`confAUTO_REBUILD&#039;)dnl&lt;br /&gt;
define(`confTO_CONNECT&#039;, `1m&#039;)dnl&lt;br /&gt;
define(`confTRY_NULL_MX_LIST&#039;,true)dnl&lt;br /&gt;
define(`confDONT_PROBE_INTERFACES&#039;,true)dnl&lt;br /&gt;
define(`PROCMAIL_MAILER_PATH&#039;,`/usr/bin/procmail&#039;)dnl&lt;br /&gt;
define(`ALIAS_FILE&#039;, `/etc/aliases&#039;)dnl&lt;br /&gt;
define(`STATUS_FILE&#039;, `/var/log/mail/statistics&#039;)dnl&lt;br /&gt;
define(`UUCP_MAILER_MAX&#039;, `2000000&#039;)dnl&lt;br /&gt;
define(`confUSERDB_SPEC&#039;, `/etc/mail/userdb.db&#039;)dnl&lt;br /&gt;
define(`confPRIVACY_FLAGS&#039;, `authwarnings,novrfy,noexpn,restrictqrun&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The following allows relaying if the user authenticates, and disallows&lt;br /&gt;
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links&lt;br /&gt;
dnl #&lt;br /&gt;
define(`confAUTH_OPTIONS&#039;,`A&#039;)&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # PLAIN is the preferred plaintext authentication method and used by&lt;br /&gt;
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do&lt;br /&gt;
dnl # use LOGIN. Other mechanisms should be used if the connection is not&lt;br /&gt;
dnl # guaranteed secure.&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # TRUST_AUTH_MECH(`DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#039;)dnl&lt;br /&gt;
dnl # define(`confAUTH_MECHANISMS&#039;, `DIGEST-MD5 CRAM-MD5 LOGIN PLAIN&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
TRUST_AUTH_MECH(`LOGIN PLAIN&#039;)dnl&lt;br /&gt;
define(`confAUTH_MECHANISMS&#039;, `LOGIN PLAIN&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # Rudimentary information on creating certificates for sendmail TLS:&lt;br /&gt;
dnl #     make -C /usr/share/ssl/certs usage&lt;br /&gt;
dnl # or use the included makecert.sh script&lt;br /&gt;
dnl #&lt;br /&gt;
dnl define(`confCACERT_PATH&#039;,`/usr/share/ssl/certs&#039;)&lt;br /&gt;
dnl define(`confCACERT&#039;,`/usr/share/ssl/certs/ca-bundle.crt&#039;)&lt;br /&gt;
dnl define(`confSERVER_CERT&#039;,`/usr/share/ssl/certs/sendmail.pem&#039;)&lt;br /&gt;
dnl define(`confSERVER_KEY&#039;,`/usr/share/ssl/certs/sendmail.pem&#039;)&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP&#039;s&lt;br /&gt;
dnl # slapd, which requires the file to be readble by group ldap&lt;br /&gt;
dnl #&lt;br /&gt;
dnl define(`confDONT_BLAME_SENDMAIL&#039;,`groupreadablekeyfile&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl define(`confTO_QUEUEWARN&#039;, `4h&#039;)dnl&lt;br /&gt;
dnl define(`confTO_QUEUERETURN&#039;, `5d&#039;)dnl&lt;br /&gt;
dnl define(`confQUEUE_LA&#039;, `12&#039;)dnl&lt;br /&gt;
dnl define(`confREFUSE_LA&#039;, `18&#039;)dnl&lt;br /&gt;
define(`confTO_IDENT&#039;, `0&#039;)dnl&lt;br /&gt;
dnl FEATURE(delay_checks)dnl&lt;br /&gt;
FEATURE(`no_default_msa&#039;,`dnl&#039;)dnl&lt;br /&gt;
FEATURE(`smrsh&#039;,`/usr/sbin/smrsh&#039;)dnl&lt;br /&gt;
FEATURE(`mailertable&#039;,`hash -o /etc/mail/mailertable.db&#039;)dnl&lt;br /&gt;
FEATURE(`virtusertable&#039;,`hash -o /etc/mail/virtusertable.db&#039;)dnl&lt;br /&gt;
FEATURE(redirect)dnl&lt;br /&gt;
FEATURE(always_add_domain)dnl&lt;br /&gt;
FEATURE(use_cw_file)dnl&lt;br /&gt;
FEATURE(use_ct_file)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The -t option will retry delivery if e.g. the user runs over his quota.&lt;br /&gt;
dnl #&lt;br /&gt;
FEATURE(local_procmail,`&#039;,`procmail -t -Y -a $h -d $u&#039;)dnl&lt;br /&gt;
FEATURE(`access_db&#039;,`hash -T&amp;lt;TMPF&amp;gt; -o /etc/mail/access.db&#039;)dnl&lt;br /&gt;
FEATURE(`blacklist_recipients&#039;)dnl&lt;br /&gt;
EXPOSED_USER(`root&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The following causes sendmail to only listen on the IPv4 loopback address&lt;br /&gt;
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback&lt;br /&gt;
dnl # address restriction to accept email from the internet or intranet.&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The following causes sendmail to additionally listen to port 587 for&lt;br /&gt;
dnl # mail from MUAs that authenticate. Roaming users who can&#039;t reach their&lt;br /&gt;
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find&lt;br /&gt;
dnl # this useful.&lt;br /&gt;
dnl #&lt;br /&gt;
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The following causes sendmail to additionally listen to port 465, but&lt;br /&gt;
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed&lt;br /&gt;
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can&#039;t&lt;br /&gt;
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS&lt;br /&gt;
dnl # and doesn&#039;t support the deprecated smtps; Evolution &amp;lt;1.1.1 uses smtps&lt;br /&gt;
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # For this to work your OpenSSL certificates must be configured.&lt;br /&gt;
dnl #&lt;br /&gt;
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The following causes sendmail to additionally listen on the IPv6 loopback&lt;br /&gt;
dnl # device. Remove the loopback address restriction listen to the network.&lt;br /&gt;
dnl #&lt;br /&gt;
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # enable both ipv6 and ipv4 in sendmail:&lt;br /&gt;
dnl #&lt;br /&gt;
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6&#039;)&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # We strongly recommend not accepting unresolvable domains if you want to&lt;br /&gt;
dnl # protect yourself from spam. However, the laptop and users on computers&lt;br /&gt;
dnl # that do not have 24x7 DNS do need this.&lt;br /&gt;
dnl #&lt;br /&gt;
FEATURE(`accept_unresolvable_domains&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl FEATURE(`relay_based_on_MX&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # Also accept email sent to &quot;localhost.localdomain&quot; as local email.&lt;br /&gt;
dnl #&lt;br /&gt;
LOCAL_DOMAIN(`localhost.localdomain&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # The following example makes mail from this host and any additional&lt;br /&gt;
dnl # specified domains appear to be sent from mydomain.com&lt;br /&gt;
dnl #&lt;br /&gt;
dnl MASQUERADE_AS(`sprinkler.com&#039;)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # masquerade not just the headers, but the envelope as well&lt;br /&gt;
dnl #&lt;br /&gt;
dnl FEATURE(masquerade_envelope)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl # masquerade not just @mydomainalias.com, but @*.mydomainalias.com as well&lt;br /&gt;
dnl #&lt;br /&gt;
dnl FEATURE(masquerade_entire_domain)dnl&lt;br /&gt;
dnl #&lt;br /&gt;
dnl MASQUERADE_DOMAIN(localhost)dnl&lt;br /&gt;
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl&lt;br /&gt;
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl&lt;br /&gt;
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl&lt;br /&gt;
MAILER(smtp)dnl&lt;br /&gt;
MAILER(procmail)dnl&lt;br /&gt;
&lt;/SPAN&gt; 
    </content:encoded>

    <pubDate>Mon, 01 May 2006 17:05:37 -0600</pubDate>
    <guid isPermaLink="false">http://blog.devhen.com/archives/169.html</guid>
    
</item>

</channel>
</rss>