<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>sendmail &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/sendmail/</link>
	<description>Feed of posts on WordPress.com tagged "sendmail"</description>
	<pubDate>Thu, 03 Dec 2009 05:05:25 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Sending Email from PHP in Ubuntu Desktop]]></title>
<link>http://williambuell.wordpress.com/2009/11/28/sending-email-from-php-in-ubuntu-desktop/</link>
<pubDate>Sun, 29 Nov 2009 00:35:14 +0000</pubDate>
<dc:creator>William Buell</dc:creator>
<guid>http://williambuell.wordpress.com/2009/11/28/sending-email-from-php-in-ubuntu-desktop/</guid>
<description><![CDATA[http://ubuntuforums.org/showthread.php?t=135397 Re: Path of Sendmail Open synaptic and search for se]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><a href="http://ubuntuforums.org/showthread.php?t=135397" target="_blank">http://ubuntuforums.org/showthread.php?t=135397</a></p>
<p> Re: Path of Sendmail<br />
Open synaptic and search for sendmail. Then install it from there.</p>
<p>Sendmail will then be found in /usr/sbin/sendmail</p>
<p>; For Win32 only.<br />
;sendmail_from = me@localhost.com</p>
<p>; For Unix only.  You may supply arguments as well (default: &#8220;sendmail -t -i&#8221;).<br />
sendmail_path = /usr/sbin/sendmail -t -i  </p>
<p>or possibly:<br />
sendmail_path = /usr/sbin/sendmail -i -t<br />
or<br />
sendmail_path = /usr/lib/sendmail -i -t</p>
<p>MY PHP.INI file is located in /etc/php5/apache2</p>
<p>I go into TERMINAL and type</p>
<p>sudo gedit<br />
It prompts me for the root password<br />
and then I am in gedit with superadmin rights and I can navigate to the php.ini file and change it. The very first thing I ever did was to open php.ini and do SAVE AS to original.php.ini so I can always revert back to the default.</p>
<p>http://ubuntuforums.org/showthread.php?t=331137</p>
<p>NOTE: THE synaptic mgr install of POSTFIX will remove SENDMAIL.<br />
what worked for me was:<br />
apt-get install postfix</p>
<p>and then edit php.ini<br />
Relevant lines in /etc/php5/apache2/php.ini:</p>
<p>[mail function]<br />
; For Win32 only.<br />
SMTP = localhost<br />
smtp_port = 25</p>
<p>; For Win32 only.<br />
;sendmail_from = me@example.com</p>
<p>; For Unix only. You may supply arguments as well (default: &#8220;sendmail -t -i&#8221;).<br />
sendmail_path = /usr/sbin/sendmail -t -i</p>
<p>and edited /etc/postfix/main.cf and put my correct external smtp server<br />
relayhost = smtpauth.earthlink.net</p>
<p>restart the services that had configuration changes</p>
<p>During the postfix installation, I chose the Internet Configuration. If you hover the mouse over the choice field, a tool tip will explain all the choices. I noticed that it offered me bryan-desktop as a name for the system, so I stuck with that, since it might be required, and I have no idea how to find the name of my system.</p>
<p>Now all I need to do is TERMINAL sudo gedit </p>
<p>and edited /etc/postfix/main.cf and put my correct external smtp server<br />
example &#8211; relayhost = smtpauth.earthlink.net  </p>
<p>(but mine will I THINK be smpt.gmail.com</p>
<p>restart the services that had configuration changes</p>
<p>OF COURSE, the first thing I do when I gedit main.cf is to<br />
SAVE AS original.main.cf, close, and reopen main.cf</p>
<p>When I make the above mentioned chage to the file, I find:</p>
<p># See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for<br />
# information on enabling SSL in the smtp client.</p>
<p>AND HERE IS WHAT I FIND IN THE README FILE, NONE OF WHICH SEEMS VERY HELPFUL:</p>
<p>There are some significant differences between the Debian Postfix packages,<br />
and the source from upstream:</p>
<p>1.  The Debian install is chrooted by default.<br />
2.  Dynamically loadable map support.<br />
3.  For policy reasons:<br />
  a. SASL configuration goes in /etc/postfix/sasl<br />
  b. myhostname=/path/to/file is supported (and used) in main.cf<br />
4.  smtp_line_length_limit defaults to 0, instead of 990, in absolute<br />
    violation of the RFC.  Note that mailers in the path will still<br />
    potentially split the line, though.  This will be removed at some<br />
    point in the future.<br />
5.  IPV6 support is enabled: postfix listens on ipv6/ipv4 by default,<br />
    (see: inet_protocols)<br />
6.  TLS/SASL support is enabled.<br />
7.  rmail comes from sendmail, not from postfix.<br />
8.  The upstream main.cf is delivered as /usr/share/postfix/main.cf.dist,<br />
    rather than cluttering /etc/postfix/main.cf with comments.</p>
<p>Known caveats:<br />
1.  The dynamically loadable modules are not found in the chroot.<br />
    Therefore, proxy maps may require you to copy the appropriate shared<br />
    object into the chroot if you chroot the proxy service in master.cf.<br />
2.  Some map types (and SASL support) require some extra configuration<br />
    (beyond what upstream indicates) to run inside the chroot.  The simplest<br />
    solution for the maps is to use the proxy service, which is not chrooted.<br />
    SASL is a bit more complex, and is on the TODO list&#8230;<br />
3.  Note that the chrooted daemons open /dev/log before chrooting, so if your<br />
    syslog daemon is restarted, the daemons will be unable to reconnect to the<br />
    syslog socket, and hence being unable to log.  The postfix package provides<br />
    a config snipped for the rsyslog daemon in /etc/rsyslog.d/postfix.conf to<br />
    also open a socket in /var/log/postfix/dev.  For other syslog daemons, you<br />
    will also have to restart postfix after restarting the syslog daemon, or<br />
    configure it to open an additional socket.<br />
  a. For sysklogd (the default in Debian versions prior to Lenny), add<br />
     SYSLOG=&#8221;-a /var/spool/postfix/dev/log&#8221; to /etc/default/syslog.<br />
  b. For inetutils-syslogd, add SYSLOGD_OPTS=&#8221;-a /var/spool/postfix/dev/log&#8221; to<br />
     /etc/default/inetutils-syslogd.</p>
<p>HERE IS A LINK THAT LOOKS MORE HELPFUL</p>
<p><a href="http://behindmyscreen.newsvine.com/_news/2006/12/31/501615-configuringubuntu-postfix-and-gmail-in-101-easy-steps" TARGET="_BLANK">http://behindmyscreen.newsvine.com/_news/2006/12/31/501615-configuringubuntu-postfix-and-gmail-in-101-easy-steps</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[CS4 Master Collection Download]]></title>
<link>http://adobecs4mastercollection.wordpress.com/2009/11/17/cs4-master-collection-download/</link>
<pubDate>Tue, 17 Nov 2009 14:54:33 +0000</pubDate>
<dc:creator>Adobe CS4 Master Collection</dc:creator>
<guid>http://adobecs4mastercollection.wordpress.com/2009/11/17/cs4-master-collection-download/</guid>
<description><![CDATA[Adobe Master Collection CS4 &#8211; US/ENG [Repack] Megaupload, Hotfile &#8230;Adobe Master Collecti]]></description>
<content:encoded><![CDATA[Adobe Master Collection CS4 &#8211; US/ENG [Repack] Megaupload, Hotfile &#8230;Adobe Master Collecti]]></content:encoded>
</item>
<item>
<title><![CDATA[Send mail trong ASP.NET ]]></title>
<link>http://dyelvn.wordpress.com/2009/11/16/send-mail-trong-asp-net/</link>
<pubDate>Mon, 16 Nov 2009 06:11:44 +0000</pubDate>
<dc:creator>keithervn</dc:creator>
<guid>http://dyelvn.wordpress.com/2009/11/16/send-mail-trong-asp-net/</guid>
<description><![CDATA[Send mail trong ASP.NET sử dụng C# Class dùng để gửi mail tới 1 hay nhiều người, có cho phép đính kè]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Send mail trong ASP.NET sử dụng C#                     Class dùng để gửi mail tới 1 hay nhiều người, có cho phép đính kèm tệp tin vào email&#8230;</p>
<p>Việc gửi mail là 1 công việc thường ngày và viết ra 1 chương trình gửi mail thật đơn giản nhưng không phải ai cũng biết. Mình xin giới thiệu với các bạn class Email này.</p>
<p>using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using System.Net.Mail;</p>
<p>namespace EmailClass<br />
{<br />
public class Email<br />
{<br />
public string Send_Email(string SendFrom,string SendTo, string Subject, string Body)<br />
{<br />
try<br />
{<br />
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@&#8221;\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*&#8221;);</p>
<p>bool result = regex.IsMatch(to);<br />
if (result == false)<br />
{<br />
return &#8220;Địa chỉ email không hợp lệ.&#8221;;<br />
}<br />
else<br />
{<br />
System.Net.Mail.SmtpClient smtp = new SmtpClient();<br />
System.Net.Mail.MailMessage msg = new MailMessage(SendFrom,SendTo,Subject,Body);<br />
msg.IsBodyHtml = true;<br />
smtp.Host = &#8220;smtp.gmail.com&#8221;;//Sử dụng SMTP của gmail<br />
smtp.Send(msg);<br />
return &#8220;Email đã được gửi đến: &#8221; + SendTo + &#8220;.&#8221;;<br />
}<br />
}<br />
catch<br />
{<br />
return &#8220;&#8221;;<br />
}<br />
}</p>
<p>public string Send_Email_With_Attachment(string SendTo, string SendFrom, string Subject, string Body, string AttachmentPath)<br />
{<br />
try<br />
{<br />
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@&#8221;\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*&#8221;);</p>
<p>string from = SendFrom;<br />
string to = SendTo;<br />
string subject = Subject;<br />
string body = Body;</p>
<p>bool result = regex.IsMatch(to);</p>
<p>if (result == false)<br />
{<br />
return &#8220;Địa chỉ email không hợp lệ.&#8221;;<br />
}<br />
else<br />
{<br />
try<br />
{<br />
MailMessage em = new MailMessage(from, to,subject, body);<br />
Attachment attach = new Attachment(AttachmentPath);</p>
<p>em.Attachments.Add(attach);<br />
em.Bcc.Add(from);<br />
System.Net.Mail.SmtpClient smtp = new SmtpClient();<br />
smtp.Host = &#8220;smtp.gmail.com&#8221;;//Ví dụ xử dụng SMTP của gmail<br />
smtp.Send(em);<br />
return &#8220;&#8221;;<br />
}<br />
catch (Exception ex)<br />
{<br />
return ex.Message;<br />
}<br />
}<br />
}</p>
<p>catch (Exception ex)<br />
{<br />
return ex.Message;<br />
}<br />
}</p>
<p>public string Send_Email_With_BCC_Attachment(string SendTo, string SendBCC, string SendFrom, string Subject, string Body, string AttachmentPath)<br />
{<br />
try<br />
{<br />
System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@&#8221;\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*&#8221;);<br />
string from = SendFrom;<br />
string to = SendTo; //Danh sách email được ngăn cách nhau bởi dấu &#8220;;&#8221;<br />
string subject = Subject;<br />
string body = Body;<br />
string bcc = SendBCC;</p>
<p>bool result = true;<br />
String[] ALL_EMAILS = to.Split(&#8216;;&#8217;);</p>
<p>foreach (string emailaddress in ALL_EMAILS)<br />
{<br />
result = regex.IsMatch(emailaddress);<br />
if (result == false)<br />
{<br />
return &#8220;Địa chỉ email không hợp lệ.&#8221;;<br />
}<br />
}</p>
<p>if (result == true)<br />
{<br />
try<br />
{<br />
MailMessage em = new MailMessage(from, to, subject, body);<br />
Attachment attach = new  Attachment(AttachmentPath);<br />
em.Attachments.Add(attach);<br />
em.Bcc.Add(bcc);</p>
<p>System.Net.Mail.SmtpClient smtp = new SmtpClient();<br />
smtp.Host = &#8220;smtp.gmail.com&#8221;;//Ví dụ xử dụng SMTP của gmail<br />
smtp.Send(em);</p>
<p>return &#8220;&#8221;;<br />
}<br />
catch (Exception ex)<br />
{<br />
return ex.Message;<br />
}<br />
}<br />
else<br />
{<br />
return &#8220;&#8221;;<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
return ex.Message;<br />
}<br />
}<br />
}<br />
}</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Postfix &ndash; The Sendmail Replacement]]></title>
<link>http://jasonk2600.wordpress.com/2009/11/05/postfix-the-sendmail-replacement/</link>
<pubDate>Thu, 05 Nov 2009 23:11:00 +0000</pubDate>
<dc:creator>jasonk2600</dc:creator>
<guid>http://jasonk2600.wordpress.com/2009/11/05/postfix-the-sendmail-replacement/</guid>
<description><![CDATA[M. Zahn has written a fantastic white paper on the Postfix SMTP server.&#160; The paper describes in]]></description>
<content:encoded><![CDATA[M. Zahn has written a fantastic white paper on the Postfix SMTP server.&#160; The paper describes in]]></content:encoded>
</item>
<item>
<title><![CDATA[Sendmail Command Line Tips and Tricks]]></title>
<link>http://kiranjith.wordpress.com/2009/11/04/sendmail-command-line-tips-and-tricks/</link>
<pubDate>Wed, 04 Nov 2009 10:22:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/11/04/sendmail-command-line-tips-and-tricks/</guid>
<description><![CDATA[# mailq Prints the mail queue&#8217;s contents, same as /usr/lib/sendmail –bp # newaliases&nbsp; Reb]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># mailq</span></b></i></span><span style="font-family:Arial,Helvetica;font-size:small;"> </span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Prints the mail queue&#8217;s contents, same as /usr/lib/sendmail –bp</span>
<div style="color:blue;"><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># newaliases</span></b><span style="font-family:Arial,Helvetica;">&#160;</span></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;"> Rebuilds the aliases database file, same as /usr/lib/sendmail –bi</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span>
<div style="color:blue;"><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># hoststat</span></b><span style="font-family:Arial,Helvetica;">&#160;</span></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;"> Prints persistent host status info, same as /usr/lib/sendmail -bh</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span>
<div style="color:blue;"><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># purgestat</span></b></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;"> Purges (zeroes) persistent host status info, same as /usr/lib/sendmail -bH</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span>
<div style="color:blue;"><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># smtpd</span></b></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;"> Runs in daemon mode, same as /usr/lib/sendmail –bd –q30</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span>
<div style="color:blue;"><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># mailq –OmaxQueueRunSize=1</span></b></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;"> Quickly print the total number of messages within mail queue</span>
<div style="color:blue;"><span style="font-size:small;"><i><b><span style="font-family:Arial,Helvetica;"># /usr/lib/sendmail –q –Otimeout.queuereturn=99d</span></b><span style="font-family:Arial,Helvetica;">&#160;</span></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;">Purges the mail queue without timing out any messages. Useful if the mail server    has been down longer than the queuereturn value set in the cf.</span>
<div style="color:blue;"><span style="font-size:small;"><i># <b><span style="font-family:Arial,Helvetica;">/usr/lib/sendmail –bv foolist &#124; grep –v deliverable</span></b><span style="font-family:Arial,Helvetica;">&#160;</span></i></span></div>
<p><span style="font-family:Arial,Helvetica;font-size:small;">Prints only undeliverable addresses from in the mail list foolist. Great for    use in a shell script to remove badd addresses from a mailing list.</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">Command Line Switches</span></b>    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"> </span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-B 7bit</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Causes sendmail to clear the high-bit of every incoming byte.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-B 8bitmime</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Causes sendmail to preserve the high-bit or every incoming byte.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-ba</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;">    Uses ARPAnet/Grey-Book protocols to transfer mail.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bD</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Runs as daemon, like –bd, but does not fork and does not detach from controlling terminal.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bd</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Runs as daemon, forks and detaches.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bH</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Purges (zeroes) persistent host status info.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">bh</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Prints persistent host status info.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">bi</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Initializes the aliases database.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bm</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Causes sendmail to read and send message (this is the default)</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bp</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;">    Prints the contents of the mail queue.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bs</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;">    Runs sendmail on standard I/O.</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bt</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;">    Runs sendmail in rule testing mode.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-bv </span></b></span><br />
<address><span style="font-family:Arial,Helvetica;font-size:small;"> Verifies address.</span><span style="font-size:small;"><br /><b><span style="font-family:Arial,Helvetica;">-C /tmp/different.cf</span></b></span> <span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><span style="font-size:small;"><br /></span> <span style="font-family:Arial,Helvetica;font-size:small;"> Uses different.cf as its configuration file.</span><span style="font-size:small;"><br /><b><span style="font-family:Arial,Helvetica;">-c</span></b></span> <span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><span style="font-size:small;"><br /></span> <span style="font-family:Arial,Helvetica;font-size:small;">Sets    HoldExpensive option to true.</span><span style="font-size:small;"></p>
<p><b><span style="font-family:Arial,Helvetica;">-d </span></b></span>  <span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><span style="font-size:small;"><br /></span> <span style="font-family:Arial,Helvetica;font-size:small;">set debug mode.</span>    <span style="font-size:small;"><br /></span> </address>
<ul>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d0 – Shows general config</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d0.1 – Prints version</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d.04 – Prints local hostname and any aliases for it.</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d0.15 – Prints the list of delivery agents declared</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d0.20 – Prints address of each network interface</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d8 – Traces most DNS lookups</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d8.1 – Prints failure of low level MX searches.</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d8.2 – Prints calls to getcanonname</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d8.3 &#8211; Traces dropped local hostnames</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d8.5 – Shows hostnames tried in getcanonname</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d8.8 – Shows when MX lookups return the wrong type.</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d11 – Traces delivery agent calls</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d11.1 – Traces arguments passed to the delivery agent</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d11.2 &#8211; Prints the user ID that the delivery agent is invoked as</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21 – Traces rewriting of addresses</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21.1- Traces general ruleset rewriting</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21.2 – Traces use of $&#38; macro</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21.3 – Shows $&#62; subroutines called</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21.4 – Displays result of rewrite</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21.15 – Shows $digit replacement</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d21.35 – shows token by token LHS matching</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d27 – Traces aliasing</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d27.1 – Traces general aliasing</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d27.2 – Traces :include: files, alias self-references, and errors on     home</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d27.3 – Traces the ~/.forward path and the alias wait</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d27.4 – Prints &#8220;not safe&#8221; when a file is unsafe to trust</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d27.9 – Shows uid/gid changes when reading :include: files</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d35 – Traces macros</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d35.9 shows macro values as they are defined</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d35.14 – Shows macro names being converted to integer id’s</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d35.24 – Shows macro expansion</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d37 – Traces options and class macros</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d37.1 – Traces the setting of options</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d37.8 – Traces the adding of words to a class</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d41 – Traces the queue</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d41.1 – Traces queue ordering</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d41.2 – Shows failure to open qf files</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d41.49 – Shows skipped queue files</span>     </li>
<li><span style="font-family:Arial,Helvetica;font-size:small;">-d41.50 – Show every file in queue</span>    </li>
</ul>
<p><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-F </span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Set senders full name</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-f </span></b></span><br />
<address><span style="font-family:Arial,Helvetica;font-size:small;"> Set senders address</span><span style="font-size:small;"><br /><b><span style="font-family:Arial,Helvetica;">-h </span></b></span> <span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><span style="font-size:small;"><br /></span> <span style="font-family:Arial,Helvetica;font-size:small;">Set minimum hop count</span><span style="font-size:small;"><br /><b><span style="font-family:Arial,Helvetica;">-i</span></b></span> <span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><span style="font-size:small;"><br /></span> <span style="font-family:Arial,Helvetica;font-size:small;"> Set    IgnoreDots option to true</span><span style="font-size:small;"><br /><b><span style="font-family:Arial,Helvetica;">-M</span></b></span> <span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><span style="font-size:small;"><br /></span> <span style="font-family:Arial,Helvetica;font-size:small;">Set macro</span><span style="font-size:small;"><br /><b><span style="font-family:Arial,Helvetica;">-N</span></b><br /></span>  <span style="font-family:Arial,Helvetica;font-size:small;"> Set return DNS notify information</span>    <span style="font-size:small;"><br /></span> </address>
<ul>
<li><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">never</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">     – Never return the info</span>     </li>
<li><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">success</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">     – Return on successful delivery</span>     </li>
<li><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">failure</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">     – Return on failure</span>     </li>
<li><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">delay</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">     – Return on delayed delivery</span>    </li>
</ul>
<p><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-n</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Supresses    aliasing</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-O</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;"> </span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Set an option (long name)</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-o</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Set    an option (short name)</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-pUUCP:test</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Sets protocol in $r macro to UUCP and $s macro to test</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-q30m</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Sets queue processing to every 30 min</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-qR@here.com</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Processes the queue once delivering only mail to @here.com</span><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-R hdrs</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> bounces only the headers</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-R full</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Bounces headers and body</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-s</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Sets    SaveFromLine option to true</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-T 5d</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Sets Timeout.queuereturn option to 5 days</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-t</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Gathers    a list of recipients from messages headers</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-U</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">make    this the initial MUA to MTA submission</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-V test123456</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Sets the DSN ENVID string to test123456</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-v</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Runs    sendmail in verbose mode</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">-X /var/tmp/trace.mail</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Logs both sides of smtp transactions to trace.mail file.</span><span style="font-size:small;">     </span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span></p>
<p><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">Rule Testing Mode (/usr/lib/sendmail –bt)</span></b></span><br /><span style="font-size:small;"><br /></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">?</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Prints    help</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">.</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">DrUUCP</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Defines macro r as UUCP</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">=S5</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;">    Prints the contents of ruleset 5</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">=M</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Displays    list of delivery agents</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">${name}</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Prints the value of macro name.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">$=w</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">prints the contents of the class macro w</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">/mx here.com</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Returns the MX records for here.com in the order they will be utilized</span><span style="font-size:small;">    <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">/parse foo</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Parses the value of the address foo, returns the value of crackaddr(), and the final parsed address including    the delivery agent.</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">/try local foo</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Rewrites the address foo based on the rules for local delivery</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">/tryflags HS</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Sets the flags used by /parse and /try to H for header and S for sender, can also use E for envelope and R for    recipient</span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">/canon foo</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;"> </span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Transforms the hostname foo into its canonical form</span><span style="font-size:small;">     <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">/map aliases foo</span></b></span><br /><span style="font-family:Arial,Helvetica;font-size:small;"> Looks up foo in the aliases database</span><span style="font-size:small;">     <b><span style="font-family:Arial,Helvetica;">&#160;</span></b></span><br /><span style="font-size:small;"><b><span style="font-family:Arial,Helvetica;">3,0 – me@foo</span></b></span><span style="font-family:Arial,Helvetica;font-size:small;">&#160;</span><br /><span style="font-family:Arial,Helvetica;font-size:small;">Runs the address me@foo through rulesets 3 and 0</span></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[#2 - Appunti: Mutt e GMail]]></title>
<link>http://idl3.wordpress.com/2009/11/03/2-appunti-mutt-e-gmail/</link>
<pubDate>Tue, 03 Nov 2009 14:50:26 +0000</pubDate>
<dc:creator>idl3</dc:creator>
<guid>http://idl3.wordpress.com/2009/11/03/2-appunti-mutt-e-gmail/</guid>
<description><![CDATA[Con Mutt e&#8217; possibile inviare e ricevere posta con GMail via terminale (tramite Fetchmail). Pe]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Con <a href="http://www.mutt.org/">Mutt</a> e&#8217; possibile inviare e ricevere posta con GMail via terminale (tramite Fetchmail). Per farlo occorre installare i pacchetti che ci servono (oltre a quelli soliti): <strong>gsasl e libsasl2-modules-gssapi-mit</strong> (se non ricordo male).</p>
<p>Ora <strong>eseguite mutt</strong> da terminale:<br />
<code>$ mutt</code><br />
poi <strong>modificate</strong> il file <code>~/.muttrc</code>:<br />
<code>$ nano ~/.muttrc</code><br />
scrivendo queste righe (modificate in base ai vostri dati):</p>
<pre>---8&#60;---
set imap_user = "USERNAME@gmail.com"
set imap_pass = "PASSWORD"

set smtp_url = "smtp://USERNAME@smtp.gmail.com:587/"
set smtp_pass = "PASSWORD"
set from = "USERNAME@gmail.com"
set realname = "NOME COGNOME"

set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"

set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/bodies
set certificate_file=~/.mutt/certificates

set move = no
---8&#60;---</pre>
<p>State attenti perche&#8217; in questo file <strong>c&#8217;e&#8217; la vostra password</strong> di GMail, quindi date un:<br />
<code>$ chmod 700 .muttrc</code><br />
per impedire agli altri utenti di leggere il file.</p>
<p>Oltre ai <strong>pacchetti</strong> che ho indicato sopra, sono necessari anche <strong>sendmail</strong>, <strong>procmail</strong>, <strong>fetchmail</strong>, ma di solito sono <strong>gia&#8217; presenti</strong> nella nostra distribuzione GNU/Linux. Magari prossimamente cerchero&#8217; di fare un post con una <strong>guida passo a passo</strong> sulla configurazione di <strong>Fetchmail e Mutt</strong>.</p>
<hr />
<p style="text-align:right;"><a href="#content" title="torna su">[^] torna su</a>&#160;&#124;&#160;<a href="http://postli.com/post?u=http://idl3.wordpress.com/2009/11/03/2-appunti-mutt-e-gmail/&#38;t=2 - Appunti: Mutt e GMail" title="Post to Postli" style="color:blue;text-decoration:none;">post<span style="color:orange;">&#60;</span><span style="color:red;">li</span><span style="color:orange;">&#62;</span></a>&#160;&#124;&#160;<a href="http://www.wikio.it/vote?url=http://idl3.wordpress.com/2009/11/03/2-appunti-mutt-e-gmail/" target="_blank"><img src="http://www.wikio.it/shared/img/vote/wikio2.gif" border="0" /></a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Sendmail on Solaris 10]]></title>
<link>http://usrinapto.wordpress.com/2009/10/27/sendmail-on-solaris-10/</link>
<pubDate>Tue, 27 Oct 2009 15:42:58 +0000</pubDate>
<dc:creator>Daniel Froz</dc:creator>
<guid>http://usrinapto.wordpress.com/2009/10/27/sendmail-on-solaris-10/</guid>
<description><![CDATA[Sendmail is probably the worst mail server application ever written. Not even worth to mention that ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Sendmail is probably the worst mail server application ever written. Not even worth to mention that is the award-winner of the TOP-10 buggiest program ever written from decades (I believe that sendmail is #1 on the list). I hate it by heart! I still don&#8217;t understand why SUN engineers still supports the sendmail on their Solaris OS. Postfix or Qmail should be used instead (Qmail is the best option but due to license restrictions Postfix can be used). Long time ago I used to work with my Qmail high-availability project (<a href="http://qmailnmx.sf.net">qmail-nmx</a>).</p>
<p>In either case here is my piece of advice when you&#8217;re installing Solaris 10: Disable sendmail completely from your system!</p>
<p>In order to help you out with this I am including here the procedures that I always do once got Solaris 10 installed:</p>
<p># svcadm disable -s sendmail<br />
# svcs sendmail</p>
<p>As output from the last command you should see the following:<br />
STATE [...] FMRI<br />
disabled [...] svc:/network/smtp:sendmail</p>
<p>Done!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Bio: Wietse Venema]]></title>
<link>http://snnangola.wordpress.com/2009/10/10/bio-wietse-venema/</link>
<pubDate>Sat, 10 Oct 2009 20:46:45 +0000</pubDate>
<dc:creator>snnangola</dc:creator>
<guid>http://snnangola.wordpress.com/2009/10/10/bio-wietse-venema/</guid>
<description><![CDATA[Voltamos mais uma vez com o espaço de biografias que como sabem trará nao só pessoal Angolano mas ta]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:center;"><img class="aligncenter" src="http://www.porcupine.org/wietse/wietse-fisl.jpg" alt="" width="267" height="406" /></p>
<p>Voltamos mais uma vez com o espaço de biografias que como sabem trará nao só pessoal Angolano mas também estrangeiro. O &#8216;visado&#8217; desta vez é Wietse zweitze Venema, que por ser uma figura ilustre é aqui trazida.</p>
<p>Holandês de nacionalidade, Formado em Física pela universidade de Groeningen na Holanda é entretanto na universidade de Eindhoven onde se destaca no departamento de computação e matematica.</p>
<p>Venema como é conhecido fica famoso apôs publicar com <a href="http://en.wikipedia.org/wiki/Dan_Farmer">Dan Farmer</a> o polemico software security administrator tool for analyzing networks (que sinceramente possui iniciais claramente antibiblicas) que mereceu protestos de meio mundo temerosos de que a mesma pudesse ser usada com sucesso para encontrar falhas de segurança em qualquer sistema informatico.</p>
<p>Venema entretanto nao para: Numa altura em que o servidor de email mais usado era o sendmail e também o mais atacado por causa de inumeras falhas de segurança, ele publica um outro servidor baseado no sendmail mas mais seguro, o Postfix largamente mais utilizado que o primeiro.</p>
<p>Venema publica ainda o TCPWrapper outro programa usado mundialmente e depois o Coroner Toolkit novamente com Dan Farmer. Existem <a href="ftp://ftp.porcupine.org/pub/security/index.html">muitas outras ferramentas</a> e papers publicados por Venema que provaram-no com um dos mais proeminentes especialistas de segurança da decada de 90.</p>
<p>Venema hoje trabalha fruto do seu trabalho, na IBM nos Estados Unidos num dos seus centros de pesquisa, anda meio sumido mas aparece sempre em conferencias de software livre.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 14: Sendmail SMTP AUTH]]></title>
<link>http://kiranjith.wordpress.com/2009/09/30/sendmail-notes-14-sendmail-smtp-auth/</link>
<pubDate>Wed, 30 Sep 2009 18:10:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/30/sendmail-notes-14-sendmail-smtp-auth/</guid>
<description><![CDATA[Sendmail SMTP AUTH &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SMTP Auth support allows to relay mails based on t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br /><b><span style="font-size:large;">Sendmail SMTP AUTH</span></b></p>
<p>&#160;&#160;&#160;&#160;&#160; SMTP Auth support allows to relay mails based on the smtp authentication when the client or users IP is getting changed(For a Roaming user).</p>
<p>Inorder to enable the smtp-auth support in sendmail the following packages are needed.
<ol>
<li><i>cyrus-sasl&#160;&#160;&#160;&#160; </i></li>
<li><i>cyrus-sasl-plain (For Plain Authentication)</i></li>
<li><i>cyrus-sasl-devel (Some devel libs are needed by sendmail)</i></li>
<li><i>cyrus-sasl-crammd5 (For CRAM MD5 auth)</i></li>
<li><i>cyrus-sasl-digestmd5</i></li>
<li><i>cyrus-sasl-otp</i></li>
<li><i>cyrus-sasl-gssapi</i></li>
</ol>
<p>&#160;&#160;&#160;&#160;&#160; cyrus-libraries are needed for SMTP-AUTH. After installation the above packages the cyrus-libs will be installed in&#160;&#160; /usr/lib</p>
<p>Note:-<br />&#160;&#160;&#160;&#160;&#160; If the distribution is not supporting the cyrus package, then we have to download it compile with all the auth mechanism and install.</p>
<p><b>Now we need to compile the sendmail with cyrus and install the binaries.</b></p>
<p><b><span style="font-size:large;">Compiling &#38; installing the sendmail for SMTP AUTH:</span></b></p>
<p>Got to the following directory
<p class="command"><i><b># cd sendmail-8.14.2/devtools/Site</b></i></p>
<p>&#160;&#160;&#160; Note:-<br />&#160;&#160;&#160; &#160;&#160;&#160; The Top Level Build Script (which creates the sendmail binaries) while compiling will consult the Site directory and if it finds the site.config.m4 it will include the contents for compiling. So this file is used to include additional variables or modules or extend the features sendmail. For enabling such features we have to include some derivatives in the site.config.m4.</p>
<p><b>To test the existing sendmail has SMTP-AUTH enabled:</b>
<p class="command"><i><b># telnet localhost 25</b></i><br /><i><b>Connected to localhost.localdomain (127.0.0.1).<br />Escape character is &#8216;^]&#8217;.<br />220 centos.com ESMTP Sendmail 8.14.2/8.14.2; Thu, 1 Oct 2009 17:41:53 +0400<br /><span style="color:blue;">ehlo localhost</span><br />250-centos.com Hello localhost.localdomain [127.0.0.1], pleased to meet you<br />250-ENHANCEDSTATUSCODES<br />250-PIPELINING<br />250-EXPN<br />250-VERB<br />250-8BITMIME<br />250-SIZE<br />250-DSN<br />250-DELIVERBY<br />250 HELP</b></i></p>
<p>&#160;&#160;&#160; If the SMTP-AUTH was enabled we could see an extra out put of 250-AUTH for the command ehlo localhost</p>
<p>The other way of testing the sendmail for the feature of SMTP-AUTH is
<p class="command"><i><b># sendmail -v -d0.10</b></i></p>
<p>&#160;&#160;&#160; This will echo to shell all the feature of sendmail in debug mode. here look for the sasl in output.</p>
<p>Now we will create some derivatives in the site.config.m4 file and compile &#38; install sendmail again to enable the SMTP-AUTH in sendmail.
<p class="command"><i><b>APPENDDEF(`confENVDEF&#8217;, `-DSASL=2&#8242;) <br /><span style="color:black;">#This will tell sendmail to include the support sasl version 2</span><br />APPENDDEF(`conf_sendmail_LIBS&#8217;, `-lsasl2&#8242;)<br /><span style="color:black;">#This will tell sendmail to use the given libraries that can be found in the lib directory as mentioned in the next derivative</span><br />APPENDDEF(`confLIBDIRS&#8217;, `-l/usr/lib&#8217;)<br />APPENDDEF(`conf_INCDIRS&#8217;,`-I/usr/include/sasl&#8217;)<br /><span style="color:black;">#This will tell sendmail the location of the header files</span></b></i></p>
<p class="command">&#160;<i><b> # Now save the configuration. re-compile the binary.</b></i></p>
<p>&#160;&#160;&#160; <i><b>Remove the obj.Linux.2.6.18-128.el5.i686</b></i> directory before compiling the sendmail again. Now run the build script
<p class="command"><i><b># cd sendmail-8.14.2<br /># ./Build </b></i></p>
<p>&#160;&#160;&#160; Check the build process to find the sasl2 has been including or not. The build process has to complete successfully <br />Before copying the sendmail binary to /usr/sbin location we will check whether the new compiled binary has the the option of sendmail SMTP-AUTH<br />To check this navigate to following directory 
<p class="command"><i><b># cd sendmail-8.14.2/obj.Linux.2.6.18-128.el5.i686/sendmail<br /># ./sendmail -v -d0.10</b></i></p>
<p>&#160;&#160;&#160; Here we should get an output similar to 
<p class="command"><b><i>Compiled with: DNSMAP LOG MATCHGECOS MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETUNIX NEWDB PIPELINING SASLv2 SCANF USERDB XDEBUG</i></b></p>
<p>Now copy this sendmail binary to the path of running sendmail 
<p class="command"><i><b># cp sendmail /usr/sbin</b></i></p>
<p>&#160;&#160;&#160; Now we have the new binaries. verify the permission of the binaries
<p class="command"><i><b># chown root:smmsp /usr/sbin/sendmail<br /># chmod g+s /usr/sbin/sendmail </b></i></p>
<p>&#160;&#160;&#160; So this will make the sendmail to execute as the user group (smmsp)<br />To verify
<p class="command"><i><b># ls -ltr /usr/sbin</b></i><br /><i><b>-r-xr-sr-x 1 root smmsp&#160;&#160; 678197 Oct&#160; 1 18:54 sendmail</b></i></p>
<p><span style="font-size:large;"><b>Now configure the sendmail.mc file to include the smtp-auth</b></span>
<p class="command"><i><b># cd sendmail-8.14.2/cf/cf<br /># vi sendmail.mc</b></i><br /><i><b>TRUST_AUTH_MECH(`LOGIN PLAIN GSSAPI DIGEST-MD5&#8242;)dnl<br />define(`confAUTH_MECHANISMS&#8217;, `LOGIN PLAIN GSSAPI DIGEST-MD5&#8242;)dnl</b></i></p>
<p>&#160;&#160;&#160; TRUST_AUTH_MECH this will tell sendmail to trust the authentication mechanisms can use for relaying.<br />&#160;&#160;&#160; configuration auth mechanism tells sendmail that these are the authentication mechanisms that have been configured.<br />&#160;&#160;&#160; This will make sendmail to hands over the authentication to cyrus libs.</p>
<p>Note:-<br />&#160;&#160;&#160; <i><b>Sendmail hands over the control to cyrus libraries for authentication. Cyrus-libs will check the passwd file or ldap for authentication.</b></i>
<p class="command"><b><i># recompile and restart the sendmail service</i></b></p>
<p>Testing the SMTP-AUTH support is turned on
<p class="command"><i><b><span style="color:blue;">[root@centos ~]# telnet localhost 25</span><br />Trying 127.0.0.1&#8230;<br />Connected to localhost.localdomain (127.0.0.1).<br />Escape character is &#8216;^]&#8217;.<br />220 centos.com ESMTP Sendmail 8.14.2/8.14.2; Fri, 2 Oct 2009 17:18:57 +0400<br /><span style="color:blue;">ehlo localhost&#160;&#160;&#160;&#160;&#160; </span><br />250-centos.com Hello localhost.localdomain [127.0.0.1], pleased to meet you<br />250-ENHANCEDSTATUSCODES<br />250-PIPELINING<br />250-EXPN<br />250-VERB<br />250-8BITMIME<br />250-SIZE<br />250-DSN<br />250-AUTH LOGIN PLAIN DIGEST-MD5<br />250-DELIVERBY<br />250 HELP</b></i></p>
<p>&#160;&#160;&#160; Here we are looking for the line <i><b>&#8220;250-AUTH LOGIN PLAIN DIGEST-MD5&#8243;</b></i></p>
<p>Now have to configure cyrus to accept the request of sendmail
<p class="command"><i><b># cd /usr/lib/sasl2</b></i><br /><i><b># vi smtp.conf</b></i><br /><i><b>or<br /># vim /etc/sasl2/sendmail.conf <br /></b></i><br /><i><b>pwcheck_method: saslauthd</b></i></p>
<p><i><b># mv smtp.conf Sendmail.conf</b></i><br />&#160;&#160;&#160; We have to rename the smtp.conf to Sendmail.conf . In filename Sendmail.conf S is capital.</p>
<p>Now start the saslauthd service
<p class="command"><i><b># service saslauthd start</b></i></p>
<p>&#160;&#160;&#160; Now test the auth mechanism by connecting MUA like evolution,thunder bird or outlook</p>
<p><i><b>If we are getting any errors like -&#160; AUTH failure (PLAIN): user not found (-20) SASL(-13): user not found: Password verification failed<br />Try uninstalling all the packages and reinstall one bye one will sort out the issues.</b></i></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 13: Sendmail Content Scanning]]></title>
<link>http://kiranjith.wordpress.com/2009/09/28/sendmail-notes-13-sendmail-content-scanning/</link>
<pubDate>Mon, 28 Sep 2009 16:38:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/28/sendmail-notes-13-sendmail-content-scanning/</guid>
<description><![CDATA[SENDMAIL CONTENT SCANNING: Configuring the full functional content scanning using Mailscanner, Clama]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br /><b><span style="font-size:large;">SENDMAIL CONTENT SCANNING:</span></b></p>
<p>Configuring the full functional content scanning using Mailscanner, Clamav and Spamassassin</p>
<p>Initially we will configure the clamav antivirus.</p>
<p><b><span style="font-size:large;">CLAMAV ANTIVIRUS:</span></b></p>
<p><b>Installation of CLAMAV Antivirus:</b></p>
<p>Download the Source code of the software
<p class="command"><i><b># wget http://sourceforge.net/projects/clamav/files/clamav/0.95.2/clamav-0.95.2.tar.gz/download<br /># tar -zxvf clamav-0.95.2.tar.gz <br /># cd clamav-0.95.2</b></i></p>
<p>&#160;&#160;&#160; The clamav relies upon mainly the following packages. So have to install the packages prior to compiling and installation of clamav. so install the following packages prior to compiling.
<p class="command"><i><b>1. zlibs It needs zlib-1.2.2 atleast<br />&#160;&#160;&#160; zlibs-devel<br />2. bzip2<br />&#160; &#160; bzip2-libs<br />&#160; &#160; bzip2-devel<br />3. gmp<br />4. curl<br />&#160;&#160;&#160; curl-devel</b></i></p>
<p>Add the following user and group.
<p class="command"><i><b>#groupadd clamav<br />#useradd -g clamav -s /sbin/nologin clamav<br /></b></i></p>
<p>Now Compile the clamav
<p class="command"><i><b># ./configure<br /># make<br /># make install</b></i></p>
<p>&#160;&#160;&#160; This will copy the binaries to the standard location. Normaly to /usr/local/*. Now type clam  can see the new binaries that installed by make-install.</p>
<p>Configuring CLAMAV Antivirus:
<p class="command"><i><b>#cd /usr/loca/etc</b></i></p>
<p>it will contain 2 files clamd.conf (this is read by clamd deamon) and freshclam.conf (Reads by the update tool).</p>
<p>For starting the clamd daemon, have to edit the following parameters in clamd.conf
<p class="command"><i><b>#vim clamd.conf</b></i><br />#comment out the Example<br /><i><b>#Example</b></i></p>
<p class="command"><i><b>#vim freshclam.conf</b></i><br />#comment out the Example<br /><i><b>#Example</b></i></p>
<p>&#160;&#160;&#160; Now create the log file to log by freshclam.
<p class="command"><i><b>#touch /var/log/freshclam.log<br />#chmod 600 /var/log/freshclam.log<br />#chown clamav.clamav /var/log/freshclam.log</b></i></p>
<p>Now update the virus database and start the freshclam daemon.
<p class="command"><i><b>#freshclam<br />#/usr/loca/bin/freshclam -d</b></i></p>
<p>&#160;&#160;&#160; This runs the freshclam as a daemon. Add the freshclam entry to the cron job to update daily twice or thrice. And any update regarding the virus signatures will be logged to /var/log/freshclam.log.</p>
<p>It is time to start the clamd daemon now.
<p class="command"><i><b>#/usr/local/sbin/clamd<br />#ps -ef &#124;grep clam </b></i></p>
<p>&#160;&#160;&#160; this will show both (freshclam and clamd) daemon runns.</p>
<p>Adding clamd daemon to init startup(This part is optional).
<p class="command"><i><b>#cd clamav-ver/contrib/init<br />#vim clamd</b></i></p>
<p>&#160;&#160;&#160; Change the path parameters to suite the installation. and place it in init directory.
<p class="command"><i><b>#cp clamd /etc/init.d</b></i></p>
<p>Now start configuring the Spamassassin</p>
<p><span style="font-size:large;"><b>SPAMASSASSIN:</b></span></p>
<p><b>Installation:</b><br />Download the Source code of the software
<p class="command"><i><b># wget http://www.bizdirusa.com/mirrors/apache/spamassassin/source/Mail-SpamAssassin-3.2.5.tar.bz2<br /># tar -jxvf Mail-SpamAssassin-3.2.5.tar.bz2 <br /># cd Mail-SpamAssassin-3.2.5</b></i></p>
<p>We need the following packages for compiling the spamassassin:<br /><i><b>1. HTML::Parser</b></i></p>
<p>Install the pre-requiesties using cpanel.
<p class="command"><i><b>#cpanel</b></i><br /><i><b>&#62;install HTML::Parser</b></i></p>
<p>or<br />Download from cpan.org and compile and install
<p class="command"><i><b>#tar -zxvf HTML-Parser-version.gz<br /># cd HTML-Parser-version<br /># perl Makefile.pl<br /># make<br /># make install</b></i></p>
<p>The spamassassin uses the perl for compiling
<p class="command"><i><b>#perl Makefile.PL</b></i></p>
<p>&#160;&#160;&#160; This will prompt us certain details.<br /><i><b>1.mail address of admin for whom can send mail about the spam report.<br />2.network test<br />3.Checks for all the dependencies of modules. if script exits by any failed dependencies install it.</b></i>
<p class="command"><i><b><br /># make<br /># make install</b></i></p>
<p>&#160;&#160;&#160; This wil setup the spamassassin with all of the rules in /usr/share/spamassassin. The installed bnaries will&#160; be /usr/binspamc(The client binaries) &#38; /usr/bin/spamd(spamassassin daemon binaries).</p>
<p>Now we can install the init scripts from the source code.
<p class="command"><i><b>#cd Mail-SpamAssassin-3.2.5/spamd<br /># ./redhat-rc-script.sh start</b></i></p>
<p>&#160;&#160;&#160; This will start the daemon. So copy the file to /etc/init.d/ and rename it if we need to run as init daemon.</p>
<p>Now start the spamd
<p class="command"><i><b># spamd -d -c -m5 -H</b></i></p>
<p>&#160;&#160;&#160; This starts the spamassassin daemon and runs in background.</p>
<p>Its time to install and configure the Mailscanner</p>
<p><b><span style="font-size:large;">MAILSCANNER:</span></b><br /><b>Installation:</b><br />&#160;&#160;&#160; mailscanner need not to have clamd or spamassassin running to initialize or run the service.In fact it just need the perl modules that required to start.<br />Download the source code of the software.
<p class="command"><i><b>#wget http://www.mailscanner.info/files/4/tar/MailScanner-install-4.75.11-1.tar.gz<br />#tar -zxvf MailScanner-install-4.75.11-1.tar.gz <br /># cd MailScanner-install-4.75.11-1<br />&#160;&#160;&#160;</b></i> it contains perl modules and install script<i><b><br />#./install.sh</b></i></p>
<p>&#160;&#160;&#160; This installs the mailscanner in /opt directory. And mailscanner creates a new queue directory struchure in /var/spool (MailScanner, mqueue.in)
<p class="command"><i><b>/var/spool/MailScanner</b></i><br />&#160;&#160;&#160; This is a temperory directory userd for processing the msgs.<br /><i><b>/var/spool/mqueue.in</b></i></p>
<p>&#160;&#160;&#160; After starting the Mailscanner daemon we need to update the sendmail configuration to reflect the new queue structure. The new queue structure is implemented for the new two sendmail daemons. One for processing the inbound msgs i.e, the standard MTA which will accepts the mail on port 25 process the msgs and places those msgs in to queue in queue only mode. Those msgs are then re-routed in to the directory mqueue.in (we will be altering the sendmail configuration to queue msgs to mqueue.in not to deliver them).From there Mailscanner that had configured to check the mqueue.in for all 5 sec will scan the mqueue.in by consulting clamav, spamassassin and other mailicious contents and then places the msg in to mqueue directory. From here the second instance of the sendmail will deliver the msg to the destination.</p>
<p>&#160;&#160;&#160; port25 sendmail(1) recieves msg -&#62; Place the msg in mqueue.in -&#62; Mailscanner scans and places in mqueue -&#62; sendmail(2) will deliver the msg from mqueue to destination.</p>
<p><b>Configuring MailScanner:</b>
<p class="command"><i><b>#cd /opt/MailScanner</b></i><br />&#160;&#160;&#160; This is a symbolic link created by for the installed version of MailScanner.<br /><i><b># cd /opt/MailScanner/etc</b></i><br />&#160;&#160;&#160; This file contains the main configuration of MailScanner.</p>
<p>Edit the main configuration to change some key settings to start the MailScanner.
<p class="command"><i><b># vi MailScanner.conf</b></i><br /><i><b>%org-name% = kiranjith<br />%org-long-name% = Kiran&#8217;s School for Linux Lovers<br />%web-site% = kiranjith83.blogspot.com<br />Max Children = 5<br /><span style="color:black;">#by default mailscanner will launch upto 5 process to handle the mails in the mqueue.in. This can be increased according to the msg queue.</span><br />Run As User = root <br /><span style="color:black;"># has to specify the mailscanner to run as.</span><br />Queue Scan Interval = 5<br /><span style="color:black;"># this tells the mailscanner to check the mqueue.in directory in every 5 sec for a new msg.</span><br />Incoming Queue Dir = /var/spool/mqueue.in<br /><span style="color:black;">#This is the directory where the 1st sendmail instance will put the incoming mails for scanning.</span><br />Outgoing Queue Dir = /var/spool/mqueue<br /><span style="color:black;">#This is the directory where the mailscanner will place the scanned mails for 2nd instance of the sendmail to deliver.</span><br />Incoming Work Dir = /var/spool/MailScanner/incoming<br /><span style="color:black;">#This is the directory where mailscanner process the msgs.</span><br />Quarantine Dir = /var/spool/MailScanner/quarantine<br /><span style="color:black;">#In this directory MailScanner places the msgs which is infected by Virus.</span><br />Restart Every = 14400<br /><span style="color:black;">#Every 14400 sec the child process will get restarted</span><br />MTA = sendmail<br /><span style="color:black;">#This specifies the current mta running in the system.</span><br />Sendmail = /usr/lib/sendmail<br /><span style="color:black;">#path to sendmail which used to deliver the error generated on scanning</span><br />Max Normal Queue Size = 800<br /><span style="color:black;"># this tells mailscanner to stop scanning if the mail queue is this much big</span><br style="color:black;" /><span style="color:black;"> #Note:- TNEF Module is needed to scan the content send from MS Outlook.</span><br />Virus Scanning = yes<br /><span style="color:black;"># This enables the virus scanning</span><br />Virus Scanners = clamav<br /><span style="color:black;">#sets the virus scanner to clamav.</span><br />Use SpamAssassin = yes<br /><span style="color:black;"># makes mailscanner to invoke the spamassassin</span><br />Always Include SpamAssassin Repot = yes<br /><span style="color:black;">#this invokes mailscanner to involve the result of spamassassin.</span><br style="color:black;" /><span style="color:black;"> # The SpamAssassin returns a score for the scanned msg and mailscanner will make a decission upon this score. This will invoke both clamav and spamassassin.</span><br />Always Include SpamAssassin Report = yes<br /><span style="color:black;"># This will include the spamassassin repot in the mail header.</span></b></i></p>
<p class="command"><i><b>/opt/MailScanner/spam.assassin.prefs.conf</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This file consists of the rules for the spamassassin, eg:-,the white list, Black list, Spam score threshold.
<p class="command"><i><b>/opt/MailScanner/virus.scanners.conf</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This file contains the preferences of Virus scanner.
<p class="command"><i><b>/opt/MailScanner/mcp</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This Directory is contains the rules of mail contents (rules about the extension of the mail attachment)
<p class="command"><i><b>/opt/MailScanner/bin</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This directory contains the executables to run and check the mailscanner service.
<p class="command"><i><b>#./check_mailscanner</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This will launch the mailscanner service
<p class="command"><i><b>#ps -ef &#124;grep -i mailscanner</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This will show the mailscanner configuration</p>
<p><b><span style="font-size:large;">Sendmail Integrating with MailScanner:</span></b></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; By default the sendmail will be running as MSP as queue directory /var/spool/cilentmqueue and as MTA that binds to the default port of 25.
<p class="command"><i><b>#/usr/sbin/sendmail -L sm-msp-queue -Ac -q30m<br />#/usr/sbin/sendmail -L sm-mta -bd -q30m</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; These are the default deamon options that runs sendmail. So we have to change the deamon options or change the init script of sendmail with the following options.
<p class="command"><i><b>#kill any existing sendmail deamons</b></i></p>
<p>Now create a sendmail start script
<p class="command">#vim sendmail_startup.sh<br /><i><b>#!/bin/bash<br />sendmail=/usr/sbin/sendmail<br /><span style="color:purple;">#Run the sendmail as MSP program.</span><br />$sendmail -L sm-msp-queue -Ac -q30m<br /><span style="color:purple;">#Run the sendmail MTA for inbound (To accept the mail and keep in /var/spool/mqueue.in directory in queueonly mode)</span><br />$sendmail -L sm-mta-inbound -bd&#160;&#160; -OprivacyOptions=noetrn&#160;&#160; -OdeliveryMode=queueonly&#160;&#160; -OqueueDirectory=/var/spool/mqueue.in&#160; -OPidFile=/var/run/sendmail-in.pid&#160; -q30m <br /><span style="color:purple;">#Define the Outbound MTA for delivery msg from /var/spool/mqueue directory,which has been scanned by and placed by MailScanner. The inervel should be short for delivering the mail ASAP.</span><br />$sendmail -q1m</b></i></p>
<p class="command"><i><b>Save and execute the script.</b></i></p>
<p class="command"><i><b>#ps -ef &#124;grep sendmail</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; This will show the 3 sendmail process running</p>
<p>Check the mail logs
<p class="command"><i><b># tail /var/log/maillog</b></i></p>
<p>If the sendmail installation is RPM Based. Then follow this</p>
<p>Change Commands That Start Sendmail. Currently, your copy of sendmail will be started by a script such as /etc/init.d/mail or /etc/rc.d/init.d/sendmail. Somewhere in this script will be the command to start sendmail itself. This should look like this:
<p class="command">&#8212;&#8212;&#8212;&#8212;&#8212;<br /><i><b>sendmail −bd −q15m</b></i><br />&#8212;&#8212;&#8212;&#8212;&#8211;<br />You should change this to the following two lines:<br />&#8212;&#8212;&#8212;&#8212;-<br /><i><b>sendmail −bd&#160; -OprivacyOptions=noetrn&#160;&#160; -OdeliveryMode=queueonly&#160;&#160; -OqueueDirectory=/var/spool/mqueue.in&#160; -OPidFile=/var/run/sendmail-in.pid -q30m <br />sendmail -q1m</b></i><br />&#8212;&#8212;&#8212;&#8212;-</p>
<p>This first starts the copy of sendmail that provides SMTP service, building the work queue for MailScanner. It then starts the copy of sendmail that delivers the output from MailScanner. You also might need to change the commands used to shut down sendmail as it now needs to find 2 copies and kill them both.</p>
<p>Note:-<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The spamd and clamd deamons are not needed to be running. It is just to ensure the configuration files working or not.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 12: Sendmail Mailertable]]></title>
<link>http://kiranjith.wordpress.com/2009/09/26/sendmail-notes-12-sendmail-mailertable/</link>
<pubDate>Sat, 26 Sep 2009 19:06:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/26/sendmail-notes-12-sendmail-mailertable/</guid>
<description><![CDATA[&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; It is a type of mail relaying. It is useful when using the vir]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br />&#160;&#160;&#160; <br />&#160;&#160;&#160; It is a type of mail relaying. It is useful when using the virtual domains. for example if you want to forward mails to internal protected server in DMZ zone after the content scanning, mailertable can provide a solution rather than using the smarthost or nullclient.<br /><b><span style="font-size:large;"><br />Configuring the Mailer Table:</span></b></p>
<p>Configure the following in the server which is configured to recieve the mails through MX record.<br />Create the /etc/mail/mailertable
<p class="command"><i><b>#vim /etc/mail/mailertable</b></i></p>
<p>(The format is as follows<br /><b>Left Column&#160;&#160;&#160;</b> &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <br />domain name&#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&#160;&#160;&#160;&#160;&#160; <br />(To which domian it accepts&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;&#160; <br />the mail for)</p>
<p><b>Right Column</b><br />Routing Rules: <br />(Specify the mailer type(smtp or local):<br />user@domain or FQDN of host))
<p class="command"><i><b>kiran.com&#160;&#160;&#160; &#160;&#160;&#160; smtp:internalhost.kiran.com<br />jithu.com&#160;&#160;&#160; &#160;&#160;&#160; smtp:jeo@mail1.jithu.com</b></i></p>
<p>&#160;&#160;&#160; Here any mail that comes to domain kiran.com will be forwarded to internalhost.kiran.com and all the mail comes to domain jithu.com will forward to the user jeo at host mail1.jithu.com. </p>
<p>For Example:<br />This used primarily in the following scenario.<br />We have the mailertable enabled server facing the internet configured with MX record and all the mail scanning softwares. And other servers will be inside the network. So the mailertable enabled server recieves the mail primarly, scans the mail and forwards to respective servers according to the configuration in mailertable. So all the mails for a domain can be accepted by a single system and after scanning the mails can be redirected to respective sub-domains.</p>
<p>Now create the db file of mailertable
<p class="command"><i><b>#makemap hash mailertable &#60; mailertable</b></i></p>
<p>Now configure the sendmail for the Feature of mailertable
<p class="command"><i><b>FEATURE(`mailertable&#8217;)dnl</b></i></p>
<p>&#160;&#160;&#160; This will enable the mailertable support in sendmail.
<p class="command"><i><b>#compile and restart the sendmail</b></i></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 11: Sendmail Virtual Domains &amp; Vitual Users]]></title>
<link>http://kiranjith.wordpress.com/2009/09/26/sendmail-notes-11-sendmail-virtual-domains-vitual-users/</link>
<pubDate>Sat, 26 Sep 2009 11:15:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/26/sendmail-notes-11-sendmail-virtual-domains-vitual-users/</guid>
<description><![CDATA[Basic Virtual Domains &nbsp;&nbsp;&nbsp; Sendmail allows to host multiple domains in single instance]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br /><b><span style="font-size:large;">Basic Virtual Domains</span></b></p>
<p>&#160;&#160;&#160; Sendmail allows to host multiple domains in single instance. The Basic Virtual Domain can be created using local-host-name file. When sendmail receives mail, it needs a way of determining whether it is responsible for the mail it receives. It uses the <i>/etc/mail/local-host-names</i> file to do this. This file has a list of hostnames and domains for which sendmail responsible for mail.<br />For example, if this mail server was to accept mail for the domains kiran.com and jithu.com then the file would look like this:
<p class="command"><i><b><br /># cat&#160; /etc/mail/local-host-names</b></i><br /><i><b>kiran.com<br />jithu.com</b></i></p>
<p>In this case, remember to modify the MX record of the jithu.com DNS zonefile point to kiran.com. Here is an example (Remember each &#8220;.&#8221; is important):
<p class="command"><i><b><br />jithu.com. MX 10 mail.kiran.com.</b></i></p>
<p>&#160;&#160;&#160; So if we send mail to the user &#8220;user1&#8243; for both the domain (user1@kiran.com &#38; user1@jithu.com),because of the MX record pointed the mail will reach the same server and as we have configured the local-host-name file sendmail will accept the mail for both the domains. The mail will be delivered to the same user user1 which is a local user.<br />Note:<br />&#160;&#160;&#160; The mail server will default acceptance of mail for its FQDN defined without the entry in local-host-names.</p>
<p><b><span style="font-size:large;">Virtual users and virtual domains:</span></b></p>
<p>&#160;&#160;&#160; This is defined using the virtual user table feature in sendmail configuration.The file used is virtusertable in /etc/mail. While defining the virtusertable the domain name should not exist in local-host-names.<br />&#160;&#160;&#160; The /etc/mail/virtusertable file contains a set of simple instructions on what to do with received mail. The first column lists the target email address and the second column lists the local user&#8217;s mail box, a remote email address, or a mailing list entry in the /etc/aliases file to which the email should be forwarded.<br />If there is no match in the virtusertable file, sendmail checks for the full email address in the /etc/aliases file. </p>
<p><b>Defining the virtual domains and users</b> (Keep in mind that the exact MX record has been added to respective domains):
<p class="command"><i><b>FEATURE(`virtusertable&#8217;)dnl <br />VIRTUSER_DOMAIN_FILE(`-o /etc/mail/virtuserdomain&#8217;)dnl</b></i></p>
<p>&#160;&#160;&#160;<i><b> FEATURE(`virtusertable&#8217;)dnl </b></i>expects to existance of the database&#160; vrtusertable in /etc/mail.<br /><i><b>&#160;&#160;&#160; VIRTUSER_DOMAIN_FILE(`-o /etc/mail/virtuserdomain&#8217;)</b></i> it looks up the various domains that supported by sendmail in this given path.
<p class="command"><i><b>#compile configuration and restart the sendmail service</b></i></p>
<p>Now create the virtuserdomain file &#8211; this will tell the sendmail a list of domains that sendmail has to recieve mails
<p class="command"><i><b>#edit /etc/mail/virtuserdomain</b></i><br /><i><b>kiran.com<br />jithu.com</b></i></p>
<p>Now create the virtusertable database &#8211; it contains the mapping of virtual users/domains to mail box or remote mail box
<p class="command"><b><i>#create/edit &#160;&#160; /etc/mail/virtusertable</i></b><br /><i><b>user1@kiran.com&#160;&#160;&#160; &#160;&#160;&#160; kiran@someotherdomain<br />user2@jithu.com&#160;&#160;&#160; &#160;&#160;&#160; jithu</b></i><br />&#160; <br /><i><b>#makemap hash virtusertable &#60; virtusertable</b></i><br /><i><b><br />#Now restart the sendmail service</b></i></p>
<p>&#160;&#160;&#160; Now if we sendmail to user1@kiran.com from anywhere it will be redirected to kiran@someotherdomain and mail send to user2@jithu.com will be send to the local mail box of user jithu.</p>
<p><b>Other options in virtusertable:</b>
<p class="command"><i><b>@fazi.com&#160;&#160;&#160; jithu<br />@jithuki.com&#160;&#160;&#160; kiran<br />@mydomain.com&#160;&#160;&#160; mailuser@remotedomain.com</b></i></p>
<p>&#160;&#160;&#160; This will redirect all the mails that came to @fazi.com to user jithu, and all the mails send to domain jithuki.com to local user kiran. Any mail comes to mydomain.com will be redirected to mailuser@remotedomain.com</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 10: Sendmail SMARTHOST &amp; Null Client]]></title>
<link>http://kiranjith.wordpress.com/2009/09/24/sendmail-notes-10-sendmail-smarthost-null-client/</link>
<pubDate>Thu, 24 Sep 2009 19:27:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/24/sendmail-notes-10-sendmail-smarthost-null-client/</guid>
<description><![CDATA[Sendmail Smart Host &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Smarthost is a smtp server that forwards the non ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br /><b><span style="font-size:large;">Sendmail Smart Host </span></b><br />&#160;&#160;&#160;&#160;&#160; Smarthost is a smtp server that forwards  the non local mails to another server that has proper DNS resolution.</p>
<p><b>DEFINING THE SMARTHOST:</b></p>
<p>&#160;&#160;&#160; Define this derivative in the Host mail configuration where we have to forward the mail to another server.
<p class="command"><i><b>define(`SMART_HOST&#8217;, `192.168.1.30&#8242;)<br /></b></i><span style="color:purple;"><span style="color:black;">or</span></span><i><b><br />define(`SMART_HOST&#8217;, `isp.mailserver.com&#8217;)</b></i></p>
<p>&#160;&#160;&#160;&#160;&#160; The Smart host entry can be either IP address or with Hostname
<p class="command"><i><b>#recompile the sendmail.cf and restart the sendmail service in hosts</b></i></p>
<p><b>Now go to main mailserver (isp.mailserver.com):</b><br />Permit the host in Relay
<p class="command"><i><b>#vi /etc/mail/access</b></i><br /><i><b>add the ip address of the smarthost</b></i><br /><i><b>#makemap hash acess &#60; access</b></i></p>
<p>Now if we send mail from the Host to internet the message will be Relayed through isp.mailserver.com to internet.Verify the logs on each servers. All the details of the mail relays will be found in the msg headers(through which hosts the mail has be relayed).</p>
<p><b><span style="font-size:large;">NULL CLIENT CONFIGURATION:</span></b></p>
<p>&#160;&#160;&#160;&#160;&#160; In contrast with SMARTHOST, NULL CLIENT CONFIGURATION will redirect all mails including local msgs, not just the remote mails to the defined server.This is used where in the situation that need to make the server to just send the msgs and not to receive any msgs.</p>
<p>Define the Following in the HOST that needed to be configured as NULL CLIENT.<br />first comment the SMART_HOST definition. Add the following in sendmail.mc
<p class="command"><i><b>FEATURE(`nullclient&#8217;, `isp.mailserver.com&#8217;)</b></i><br /><b><i>#recompile the sendmail.cf and restart the mail service</i></b></p>
<p>&#160;&#160;&#160;&#160;&#160; This will make the host to forward all the mails to the server isp.mailserver.com. Test this by running sendmail in debugging mode
<p class="command"><i><b>#sendmail -d -i</b></i></p>
<p>Note:- In server (isp.mailserver.com) has to define the access to relay this host.<br />&#160;&#160;&#160;&#160;&#160;&#160; Now try sending msgs from host, this will make all the mail to relay through isp.mailserver.com.<br />Note:<br />&#160;&#160;&#160;&#160;&#160; As we are defining the Null client, since it is not setup to receive mail we have to make sure that the mail envelop will be re-written.Because in case of any reply or bouncing the host will not be accepting the mail.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 9: Sendmail Relay]]></title>
<link>http://kiranjith.wordpress.com/2009/09/24/sendmail-notes-9-sendmail-relay/</link>
<pubDate>Thu, 24 Sep 2009 19:18:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/24/sendmail-notes-9-sendmail-relay/</guid>
<description><![CDATA[Default configuration of the sendmail Denies the Relay from other hosts.But the following option mak]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br />Default configuration of the sendmail Denies the Relay from other hosts.<br />But the following option makes the sendmail to run as open relay
<p class="command"><i><b>FEATURE(`promiscuous_relay&#8217;)</b></i></p>
<p>&#160;&#160;&#160; This option allows for any clients to connect to our SMTP and can send mail to any destination.</p>
<p><span style="font-size:large;"><b>Testing a Open relay:</b></span><br />Try to connect to the Server from outside of the network and follow the procedure.<br /><b>The Following Example shows the server that denies the Open Relay:</b>
<p class="command"><i><b>[root@kiran ~]# telnet 192.168.10.2 25</b></i><br /><i><b>Trying 192.168.10.2&#8230;<br />Connected to fazi.com (192.168.10.2).<br />Escape character is &#8216;^]&#8217;.<br />220 centos.com ESMTP Sendmail 8.14.2/8.14.2; Wed, 23 Sep 2009 06:35:20 +0400</b></i><br /><b><i><span style="color:blue;">Mail from: kiran@domain.com</span></i></b><br /><b><i><span style="color:purple;">250 2.1.0 kiran@domain.com&#8230; Sender ok</span></i></b><br /><i><b>Rcpt To: kiran@anotherdomain.com</b></i><br /><i><b>550 5.7.1 kiran@anotherdomain.com&#8230; Relaying denied<br />quit<br />221 2.0.0 centos.com closing connection<br />Connection closed by foreign host.<br /><span style="color:blue;">[root@kiran ~]# </span></b></i></p>
<p><b>The Follwoing Example Shows the server that allows Open relay:</b>
<p class="command"><i><b>[root@kiran ~]# telnet 192.168.10.2 25</b></i><br /><b><i>Trying 192.168.10.2&#8230;<br />Connected to fazi.com (192.168.10.2).<br />Escape character is &#8216;^]&#8217;.<br />220 centos.com ESMTP Sendmail 8.14.2/8.14.2; Wed, 23 Sep 2009 06:43:14 +0400</i></b><br /><i><b>Helo domain.com</b></i><br /><b><i><span style="color:purple;">250 centos.com Hello mail1.kiran.com [192.168.10.1], pleased to meet you</span></i></b><br /><i><b>Mail From:kiran@domain.com</b></i><br /><i><b>250 2.1.0 kiran@domain.com&#8230; Sender ok</b></i><br /><i><b>Rcpt To:kiran@anydomain.com</b></i><br /><i><b>250 2.1.5 kiran@anydomain.com&#8230; Recipient ok</b></i><br /><i><b>Data</b></i><br /><i><b>354 Enter mail, end with &#8220;.&#8221; on a line by itself<br /><span style="color:blue;">This is to test the Open relay</span></b></i><i><b><br />.</b></i><br /><i><b><span style="color:purple;">250 2.0.0 n8N2hEOp009181 Message accepted for delivery</span></b></i><br /><i><b>Quit</b></i><br /><i><b>221 2.0.0 centos.com closing connection<br />Connection closed by foreign host.</b></i><br /><b><i>[root@kiran ~]# </i></b></p>
<p>&#160;&#160;&#160; The destination of the mail should be resolvable to sendmail for any kind of relay.</p>
<p><b><span style="font-size:large;">Relay in Sendmail:</span></b><br />&#160;&#160;&#160; Relay in sendmail can be achieved by 2 common ways<br /><b><br />1. Using the Relay-domains.<br />2. Using the access database.</b></p>
<p><b>1. Using relay-domains file:</b><br />&#160;&#160;&#160; This is very easy way to implementing the relay access.<br />Edit sendmail.mc 
<p class="command"><i><b>RELAY_DOMAIN_FILE(`/etc/mail/relay-domains&#8217;)</b></i></p>
<p>&#160;&#160;&#160; The file path to the relay-domains can be any where. Sendmail refer this while getting a new mail from any host.<br /><i><b><span style="color:blue;">/etc/mail/relay-domains</span></b></i> file can contain each IP Address of the hosts on each line (Hostname of FQDN is permissible here and this has to be resolved properly).<br />Example:-
<p class="command"><i><b>192.168.1.1<br />10.0.0.1<br />172.16.0.1</b></i><br />&#160;&#160;&#160; <i><b>Compile and Restart the sendmail service</b></i></p>
<p class="command"><i><b>RELAY_DOMAIN_FILE(`-o /etc/mail/relay-domains&#8217;)</b></i></p>
<p>&#160;&#160;&#160; Here the &#8220;-o&#8221; option makes the sendmail to loading the Relay Domain File as optional. This means if the file is not present still the sendmail starts the daemon.</p>
<p><b>2. Using the Access DB:</b><br />&#160;&#160;&#160; It extends the functionality of relay domains, defined by two columns.<br /><b>Left Hand Side Column:</b><br />Users<br />Hosts<br />Ip Address<br /><b>Right hand Side Column:</b><br />Relay<br />Reject<br />Discard<br />To enable this have to turn on the following feature.
<p class="command"><i><b>FEATURE(`access_db&#8217;, `hash -o -T /etc/mail/access&#8217;)dnl</b></i></p>
<p>&#160;&#160;&#160; The Feature enables the access db for Relay. hash is the type of database, &#8220;-o&#8221; makes the sendmail to run even if the access db file is not found, i.e makes the file optional. -T this allows access db to return the smtp errors to client and next to this we have the database location.</p>
<p>Now Create the access_db file:
<p class="command"><i><b>#vi /etc/mail/access</b></i><br /><i><b>connect:192.168.1.2&#160;&#160;&#160; RELAY<br />connect:192.168.10.9&#160;&#160;&#160; REJECT</b></i><br /><i><b>#makemap hash access &#60; access</b></i></p>
<p>&#160;&#160;&#160; If any errors are generated re-compile the makemap by <i><b>./Bulid &#38;&#38; ./Build install</b></i> from the source directory.</p>
<p>&#160;&#160;&#160; Here from the ip 192.168.1.2 sendmail will relay mail to outer world and from 192.168.10.9 will reject the relay to outer world This will make the sendmail to reject all the inbound mail traffic from the host 192.168.10.9.<br />Any update to the access doesn&#8217;t need sendmail reload to take effect. Because for each query sendmail makes query to the access.db file.</p>
<p>Other rules in access file:
<p class="command"><i><b>From:kiran@mail1.kiran.com&#160;&#160;&#160; REJECT<br />To:jithu@&#160;&#160;&#160; RELAY</b></i></p>
<p>&#160;&#160;&#160; As defined in this rule the msg send from user kiran@mail1.kiran.com will be rejected.We can specify in the second column REJECT,RELAY,OK or 550 errors too.<br />&#160;&#160;&#160; In To:jithu@ REJECT any mail send to user jithu will be REJECTED.<br /><b>&#160;&#160;&#160; To parse this rule in access db file by sendmail we have to enable the following Macro Feature in the sendmail.cf file.</b>
<p class="command"><i><b>FEATURE(`relay_mail_from&#8217;)</b></i></p>
<p>&#160;&#160;&#160; This FEATURE has to define <i><b>after the <span style="color:purple;">FEATURE(`access_db&#8217;)</span></b></i>.This will enable the sendmail to parse the access.db to check the permission of Relay in user basis.i.e, it checks the mail envelop for relay.
<p class="command">&#160;&#160;&#160; <i><b>Now compile the sendmail.cf file and restart the service.</b></i></p>
<p>&#160;&#160;&#160; This will show the warning about the open relay. so use this option carefully.</p>
<p></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 8: Sendmail Macro File Derivatives]]></title>
<link>http://kiranjith.wordpress.com/2009/09/21/sendmail-notes-8-sendmail-macro-file-derivatives/</link>
<pubDate>Mon, 21 Sep 2009 17:39:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/21/sendmail-notes-8-sendmail-macro-file-derivatives/</guid>
<description><![CDATA[Derivatives in Sendmail.mc Configuration file: #grep -i ^O sendmail.cf &nbsp;&nbsp;&nbsp; It returns]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br /><b><span style="font-size:large;">Derivatives in Sendmail.mc Configuration file:</span></b>
<p class="command"><b><i>#grep -i ^O sendmail.cf</i></b></p>
<p>&#160;&#160;&#160; It returns the <b>&#8220;options&#8221;</b> that enabled in the sendmail.cf file</p>
<p><span style="font-size:large;"><b>Options &#38; Features in sendmail.mc:</b></span><br /><b>Editing the sendmail.mc file</b>:<br />&#160;&#160;&#160; Any Options that enables inside the sendmai.mc or submit.mc should be specified after the <b><i>DOMAIN(generic)dnl</i></b> option<br />&#160;&#160;&#160; Any rules that defines should come after the MAILER option inside the sendmail.mc/submit.mc file</p>
<p><b><i>Increasing the verbositry of Log Level of sendmail:</i></b><br />&#160; Default level is 9.
<p class="command"><b><i>define(`confLOG_LEVEL&#8217;, `10&#8242;)dnl</i></b></p>
<p>Now export the sendmail.cf file from sendmail.mc
<p class="command"><i><b>#./Build install-cf</b></i><br />or<br /><i><b><span style="color:blue;">#m4&#160; ../m4/cf.m4 sendmail.mc &#62; sendmail.cf</span></b></i><br />Restart the sendmail<br /><b><i># kill -HUP `head -1 /var/run/sendmail.pid`</i></b></p>
<p><b>Maximun msg size:</b><br />Default is undefined
<p class="command"><i><b>define(`confMAX_MESSAGE_SIZE&#8217;, `4096&#8242;)dnl</b></i><br />&#160;&#160;&#160; Recompile the sendmail.cf file<br />&#160;&#160;&#160; Restart the sendmail service</p>
<p>&#160;&#160;&#160; This will resize the maximum msg size to 4K</p>
<p><b>Configuring the Maximum Recipients for MSG:</b>
<p class="command"><i><b><span style="color:purple;">define(`confMAX_RCPTS_PER_MESSAGE&#8217;, `1&#8242;)dnl</span></b></i><br />&#160;&#160;&#160; Recompile the sendmail.cf file<br />&#160;&#160;&#160; Restart the sendmail</p>
<p>Editing the sendmail.cf file directly for maximum recipients per msg by enabling the following option
<p class="command"><i><b><span style="color:purple;">O MaxRecipientsPerMessage=1</span></b></i></p>
<p>&#160;&#160;&#160; If client tries more than given number of recipients in the mail address it throws error <br />&#8220;: Too many recipients&#8221;. The msgs are queued for later delivery</p>
<p><b><span style="font-size:large;">Masquerading in sendmail:</span></b><br />&#160;&#160;&#160; Masquerading changes the mail headers.A message header is the part of the message that contains information about a specific aspect of the message. This option should define prior to the mailer derivative.
<p class="command"><b><i>MASQUERADE_AS(`mail1.jithu.com&#8217;)</i></b><br />or<br /><i><b>MASQUERADE_AS(`jithu.com&#8217;)</b></i></p>
<p>&#160;&#160;&#160; MASQUERADE_AS option is used to rewrite the host part of the mail address.&#160; This will masquerade the msgs originated from the host to reflect as mail1.jithu.com<br />&#160;&#160;&#160; For example:- mail send from host1.domain.com will be masqueraded as <br />&#160;&#160;&#160; From:- kiran@mail1.jithu.com<br />&#160;&#160;&#160; So if the recipient replies to msg will send to the host mail1.jithu.com</p>
<p><b>Masquerade the envelope:</b><br />&#160;&#160;&#160; This will masquerade the mail envelope.Envelope is what appears initially.The sender and recipient addresses used in the SMTP transaction are called the Message Envelope. In other words A message envelope is the structure that encapsulates the component parts of a message: the message body and the message headers.
<p class="command"><i><b>FEATURE(`masquerade_envelope&#8217;)</b></i></p>
<p>&#160;&#160;&#160; Now the m4 will search for the masquerade_envelope.m4 inside the features directory in source folder while compiling to create the sendmail.cf. This will change the envelope address to mail1.jithu.com as defined in MASQUERADE_AS.<br />But the message coming from root will not be masqueraded as for other normal users.<br />&#160;&#160;&#160; <br /><b>Exposed users to exclude the masquerade:</b><br />&#160;&#160;&#160; This will exclude a given user from masquerading. root user is excluded by default from masquerading.
<p class="command"><i><b>EXPOSED_USER(`jithu kiran joe paul&#8217;)dnl</b></i><br />Or<br /><i><b>EXPOSED_USER(`jithu&#8217;)dnl</b></i><br />Or <br /><i><b><span style="color:purple;">EXPOSED_USER_LIST(`path to user list&#8217;)dnl </span></b></i># user list should be one user per line</p>
<p>&#160;&#160;&#160; So here the mail&#160; for the users defined will be having the exact host details in the mail Headres as well as mail envelop.</p>
<p><i><b>Enabling the mail server to relay mails from any where:</b></i>
<p class="command"><i><b>FEATURE(`promiscuous_relay&#8217;)</b></i><br />#compile and restart the sendmail service</p>
<p>&#160;&#160;&#160; This option will allows to relay mails from anywhere, i.e, configures our system as open relay. This option should not be enabled in the production environment. If this is enabled any one can send mail using this sendmail server. Spammers will exploit this option certainly.This will make m4 to find the file named promiscuous_relay.m4 in features folder and will add the contents in to the sendmail.cf file</p>
<p><b>Masquerade Domains:</b><br />&#160;&#160;&#160; Default masquerading behavior of sendmail is, only masquerading the host part of the mail generated locally and it won&#8217;t masquerade the mails that generated from other systems.So including the option of masquerade domains will masquerade the hostname part of the mail for all other hosts that sendmail relays.
<p class="command"><i><b>FEATURE(`masquerade_entire_domain&#8217;)</b></i></p>
<p>&#160;&#160;&#160; This will enable the masquerading of mails send by all the servers/hosts that sendmail relays. The host part of the mail address is now re-written to the address as mentioned in <i><b><span style="color:purple;">MASQUERADE_AS(`jithu.com&#8217;)</span></b></i>. The exposed users are excluded in this option, that means the root user mail will not be masqueraded.
<p class="command"><i><b>MASQUERADE_DOMAIN(`mail1.fazi.com&#8217;)</b></i></p>
<p>&#160;&#160;&#160; This derivative says that any mail coming form host mail1.fazi.com should be masqueraded as defined in <i><b>MASQUERADE_AS(`jithu.com&#8217;)</b></i>. We can add &#8216;n&#8217; number of hosts seperated by  in this derivative.<br />This option is valid upon the position of <b><i><span style="color:purple;">FEATURE(`masquerade_entire_domain&#8217;)</span></i></b>, which masquerades entire mails send by any hosts.</p>
<p><b>For Example:- </b>&#160;<br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; If <b><i><span style="color:purple;">FEATURE(`masquerade_entire_domain&#8217;)</span></i></b> is set Before to <i><b>MASQUERADE_AS(`jithu.com&#8217;) </b></i><span style="color:purple;"><span style="color:black;">then all the hosts are masqueraded.</span></span><br /><span style="color:purple;"><span style="color:black;">If </span></span><b><i><span style="color:purple;">FEATURE(`masquerade_entire_domain&#8217;)</span></i></b> <span style="color:purple;"><span style="color:black;"> </span></span>is set after <i><b>MASQUERADE_AS(`jithu.com&#8217;)</b></i> then the undefined hosts will not be masqueraded.</p>
<p><b><span style="font-size:large;">Masquerading Options Explained:</span></b>
<p class="command"><b><i>FEATURE(always_add_domain)dnl<br />FEATURE(`masquerade_entire_domain&#8217;)dnl<br />FEATURE(`masquerade_envelope&#8217;)dnl<br />FEATURE(`allmasquerade&#8217;)dnl<br />MASQUERADE_AS(`my-site.com&#8217;)dnl<br />MASQUERADE_DOMAIN(`my-site.com.&#8217;)dnl<br />MASQUERADE_DOMAIN(localhost)dnl<br />MASQUERADE_DOMAIN(localhost.localdomain)dnl</i></b></p>
<p>
<ul>
<li>The <b><i>MASQUERADE_AS</i></b><span style="color:purple;"> </span>directive makes all mail originating on bigboy appear to come from a server within the domain my-site.com by rewriting the email header.</li>
<li>The<b><i> <span style="color:purple;">MASQUERADE_DOMAIN</span></i></b> directive makes mail relayed via bigboy from all machines in the another-site.com and localdomain domains appear to come from the MASQUERADE_AS domain of my-site.com. Using DNS, sendmail checks the domain name associated with the IP address of the mail relay client sending the mail to help it determine whether it should do masquerading or not.</li>
<li><b><i>FEATURE masquerade_entire_domain</i></b> makes sendmail masquerade servers named *my-site.com, and *another-site.com as my-site.com. In other words, mail from sales.my-site.com would be masqueraded as my-site.com. If this wasn&#8217;t selected, then only servers named my-site.com and my-othersite.com would be masqueraded. Use this with caution when you are sure you have the necessary authority to do this.</li>
<li><b><i><span style="color:purple;">FEATURE allmasquerade</span> </i></b>makes sendmail rewrite both recipient addresses and sender addresses relative to the local machine. If you cc: yourself on an outgoing mail, the other recipient sees a cc: to an address he knows instead of one on localhost.localdomain.&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</li>
</ul>
<p>Note: Use <b><i>FEATURE allmasquerade</i></b><span style="color:purple;"> </span>with caution if your mail server handles email for many different domains and the mailboxes for the users in these domains reside on the mail server. The allmasquerade statement causes all mail destined for these mailboxes to appear to be destined for users in the domain defined in the <i><b><span style="color:purple;">MASQUERADE_AS</span></b></i> statement. In other words, if <i><b>MASQUERADE_AS</b></i> is my-site.com and you use allmasquerade, then mail for peter@another-site.com enters the correct mailbox but sendmail rewrites the To:, making the e-mail appear to be sent to peter@my-ste.com originally. 
<ul>
<li><b><i>FEATURE always_add_domain</i></b> always masquerades email addresses, even if the mail is sent from a user on the mail server to another user on the same mail server.</li>
<li> <b><i>FEATURE masquerade_envelope</i></b> rewrites the email envelope just as MASQUERADE_AS rewrote the header. </li>
</ul>
<p><img src="//dictionarytip/skin/book.png" /></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 7: Sendmail Macros and Basic Configurations]]></title>
<link>http://kiranjith.wordpress.com/2009/09/20/sendmail-notes-7-sendmail-macros-and-basic-configurations/</link>
<pubDate>Sun, 20 Sep 2009 11:40:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/20/sendmail-notes-7-sendmail-macros-and-basic-configurations/</guid>
<description><![CDATA[M4 configuration in Sendmail&nbsp;&nbsp;&nbsp; M4 is a Macro program which allows to define key valu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br /><b>M4 configuration in Sendmail</b><br />&#160;&#160;&#160; M4 is a Macro program which allows to define key value pairs i.e names with values, such as configuration options with values and responsible for expanding the values to syntax that sendmail that recognizes.<br />eg:- sendmail.mc(Human readable config file) file is the input taken by M4 to create sendmail.cf(sendmail readable) file.</p>
<p><span style="font-size:large;"><b>Generation Of Sendmail Configuration Files:</b></span><br />&#160;&#160;&#160; If u are installing the sendmail from the source code all the configuration examples and M4 files that needed while converting the &#8220;*.mc&#8221; file will be present inside the directory /sendmail-8.14.2/cf. and if you are using the rpm based binaries all the configurations example and M4 files that needed while converting the &#8220;*.mc&#8221; file will be present inside /usr/share/sendmail-cf<br />The following is the basic configurations that needed by sendmail in sendmail.mc file to start with
<p class="command"><i><b>divert(-1)<br />divert(0)dnl<br />VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $&#8217;)<br />OSTYPE(linux)dnl<br />DOMAIN(generic)dnl<br />MAILER(local)dnl<br />MAILER(smtp)dnl</i></b></p>
<p><b><br />/sendmail-8.14.2/cf or /usr/share/sendmail-cf directory:</b><br />&#160;&#160;&#160; <b>m4/:&#160; </b>directory contains the files that is used for compiling M4 with sendmail config file while running the Build script from the sub-directory cf/ (or #m4 sendmail.mc &#62; sendmail.cf)<br />&#160;&#160;&#160; <b>README.txt</b>: file contains all the derivatives that can be understood ( M4 preprocessor )by sendmail inside this directory.<br />&#160;&#160;&#160; <b>cf/</b>:&#160; In /sendmail-8.14.2/cf or /usr/share/sendmail-cf &#8220;cf/&#8221; is the sub-directory which contains the M4 configuration files. generic-linux.mc &#38; generic-linux.cf are the two config files that is used for generation of sendmail.cf file. These configuration file is enough to create a minimum level of sendmail server on Linux distros.<br />&#160;&#160;&#160; sendmail.mc file is used by MTA and submit.cf file is used by MSP.</p>
<p><b>Basic Derivatives and struchure of sendmail.mc:</b><br /><i><b>dnl</b></i> = delete through new line<br />&#160;&#160;&#160; This tells the M4 deamon to delete any superfluous or excessive new lines after creation of subsequent derivatives for mc files to cf file.
<p class="command"><i><b>VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $&#8217;)</b></i></p>
<p>&#160;&#160;&#160; Using this derivative M4 creates the version information of the sendmail as well the OS.
<p class="command"><i><b>OSTYPE(linux)dnl</i></b></p>
<p>&#160;&#160;&#160; It says to the m4 program to navigate to the ostype directory and find the file called linux.m4 and include the contents while generating the sendmail.cf file.M4 expands this session and produces the sendmail.cf. linux.m4 contains the basic path to sendmail binaries, other utilities like procmail-the local mailer and version of OS
<p class="command"><i><b>DOMAIN(generic)dnl</b></i></p>
<p>&#160;&#160;&#160; sendmail-8.14.2/cf/domain is the directory which contains the generic.m4 file.This file is included by M4 while the generation of the &#8220;*.cf&#8221; file. The domain folder contains the basic configurations of domain examples. The generic.m4 file is used, if we have any domain routing needs such as how to handle the msgs based on a domian or a sub-domain, masqurading etc. It contains the derivatives for <br />&#160;&#160;&#160; .forward file path<br />&#160;&#160;&#160; maximum mail Header Length.<br />&#160;&#160;&#160; use of cw file etc.</p>
<p class="command"><i><b>MAILER(local)dnl&#160;&#160; &#38;<br />MAILER(smtp)dnl</b></i></p>
<p>&#160;&#160;&#160; sendmail-8.14.2/cf/mailer is the directory which contains the M4 for local,smtp as well as procmail.<br />&#160;&#160;&#160; Here every mailer has their own defnitions. inlcudes the path of program and the rules.<br />&#160;&#160;&#160; local mailer permits the redirection of the msgs in to programs.</p>
<p>Running 
<p class="command"><i><b>`./Build install-cf`</b></i></p>
<p>inside the cf directory to create the configuration file is equal to<br /><b>In source:</b>
<p class="command"><i><b>[root@centos cf]# pwd<br /><i><b>/root/sendmail/sendmail-8.14.2/cf/cf</b></i> <br />[root@centos cf]# m4&#160; ../m4/cf.m4 sendmail.mc</b></i> </p>
<p><b>In RPM based:</b>
<p class="command"><i><b><span style="color:blue;">#m4 sendmail.mc &#62; sendmail.cf</span></b></i></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 6: Sendmail with DNS FQDN &amp; MX records]]></title>
<link>http://kiranjith.wordpress.com/2009/09/20/sendmail-notes-6-sendmail-with-dns-fqdn-mx-records/</link>
<pubDate>Sun, 20 Sep 2009 09:47:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/20/sendmail-notes-6-sendmail-with-dns-fqdn-mx-records/</guid>
<description><![CDATA[&nbsp;&nbsp;&nbsp; Remote mail involves the usage of SMTP thus sendmail needs the name resolution to]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><!--.command {    padding: 1em;    border: 1px dashed #2f6fab;    color: black;    background-color: #f9f9f9;    line-height: 1.1em;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.system {    color: black;        font-family: Courier New, Courier, mono;        font-size: 12px;        font-style: italic;}.highlight {    color: #FF0000;                font-family: Georgia, "Times New Roman", Times, serif;                font-size: 12px;                text-decoration: underline;}--><br />&#160;&#160;&#160; Remote mail involves the usage of SMTP thus sendmail needs the name resolution to route the mails. For this sendmail uses  DNS  or  uses /etc/hosts.<br /><b><span style="font-size:large;">Find the FQDN of a host</span></b>
<p class="command"><i><b>&#160;# hostname -f </b></i></p>
<p>&#160;&#160;&#160; If the FQDN (which can retrieve the ip to query) is used to send the mail, then sendmail bypasses the MX record.</p>
<p><b><span style="font-size:large;">Sendmail DNS Usage:</span></b><br /><b>Using FQDN:</b><br />&#160;&#160;&#160; Sendmail performs the DNS lookup for the defined host address and gets the IP address and then delivers the msg to the destination.Remote hosts either accepts the mail or Routes the mail using any local mailer or Relays to another destination upon the configuration.<br /><i>For example:</i>
<p class="command"><i><b>#sendmail -v kiran@mail1.india.mydomain.com</b></i></p>
<p>In this above example sendmail will use the &#8216;A&#8217; record for the given address. Because the exact address of the mail server is given here for the &#8220;domain mydomain.com&#8221;</p>
<p><b>Using MX:</b><br />&#160;&#160;&#160; MX is a special type of DNS record called as Mail Exchanger Record.When mail server actualy query a Domain for direct mail, they query the dns server for the MX record and once found sendmail will attempt to direct the mail to destination according to the priority of MX record.<br />&#160;&#160;&#160; <br />Normally an &#8220;A&#8221; record is enough to get the IP address of the host for sendmail to send the mail.But MX is used because to distinguish/identify the&#160; mail servers in the given domain <br /><i>For Example:-</i>
<p class="command"><b><i>#sendmail -v kiran@mydomain.com</i></b></p>
<p>&#160;&#160;&#160; In this case sendmail has to get the ip address of the mail server for the domain &#8220;mydomain.com&#8221; to route the mail. So sendmail does a &#8220;MX&#8221; record query upon the given domain.<br />(So in nameserver the MX record entry for mail1.india is added to the domain mydomain.com; Make sure that we have a &#8216;A&#8217; record created for the same MX record)<br />&#160;&#160;&#160; This means any the mail comes to kiran@mydomain.com will be routed to mail1.india.mydomain.com to process with.<br /><b><br /><span style="font-size:large;">Backup MX &#38; Priority in MX:</span></b>
<p class="command"><i><b>&#160;&#160;&#160; mydomain.com.&#160;&#160;&#160; 14000&#160;&#160;&#160; IN&#160;&#160;&#160; MX&#160;&#160;&#160; 20&#160;&#160;&#160; mail2.india.mydomain.com.<br />&#160;&#160;&#160; mydomain.com.&#160;&#160;&#160; 14000&#160;&#160;&#160; IN&#160;&#160;&#160; MX&#160;&#160;&#160; 10&#160;&#160;&#160; mail1.india.mydomain.com.</b></i></p>
<p>&#160;&#160;&#160; In this entry in dns with respect to the MX record the host which primarily contacts the server which has priority 10. Incase of unavailable of server which has priority 10 then the MTA will contact the server which has priority 20.<br />If a backup MX server is running make sure that the user mail box is located in the backup mail server as well.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Ohne Mailserver emails per shell script versenden (SMTP over TLS)]]></title>
<link>http://linuxnetz.wordpress.com/2009/09/20/ohne-mailserver-emails-per-shell-script-versenden-smtp-over-tls/</link>
<pubDate>Sun, 20 Sep 2009 05:38:08 +0000</pubDate>
<dc:creator>linuxnetzer</dc:creator>
<guid>http://linuxnetz.wordpress.com/2009/09/20/ohne-mailserver-emails-per-shell-script-versenden-smtp-over-tls/</guid>
<description><![CDATA[Das Programm &#8220;sendEmail&#8221; versendet emails auf der Kommandozeile per smtp via TLS-Verschl]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Das Programm &#8220;sendEmail&#8221; versendet emails auf der Kommandozeile per smtp via TLS-Verschlüsselung und kommt dabei ohne Mailserver aus.</strong></p>
<div class="wp-caption alignleft" style="width: 104px"><a href="http://commons.wikimedia.org/wiki/File:AROBAZE.png"><img src="http://upload.wikimedia.org/wikipedia/commons/7/70/AROBAZE.png" alt="Lizenz: GFDL 1.2" width="94" height="95" /></a><p class="wp-caption-text">Lizenz: GFDL 1.2</p></div>
<p>Wer auf der Kommandozeile bzw. scriptgesteuert emails versenden will, der tut dies meist mit Hilfe eines Mailservers. Ein Mailserver wie sendmail ist jedoch nur mit einem nicht unerheblichen Aufwand aufzusetzen und zu warten. Darüberhinaus kann er &#8211; gerade auf Servern &#8211; ein Sicherheitsrisiko bedeuten.</p>
<p>In diese Bresche springt das Programm &#8220;sendEmail&#8221;, mit dem auch Dateianhänge versandt werden können. Der Einsatzbereich dieses kleinen Programms, das in perl geschrieben ist, ist vielfältig. So könnten z.B. Warnmails an den Administrator versandt werden, wenn:<br />
- sich der Speicherplatz einer Festplatte seiner Maximalkapazität nähert<br />
- bestimmte Schlüsselbegriffe in den Logdateien auftauchen<br />
- ein Passwort mehrmals falsch eingegeben wurde</p>
<p>Geübte Shellscripter können mit &#8220;sendEmail&#8221; (immer das große &#8220;E&#8221; benutzen!) den Eintritt eines beliebigen Ereignisses mit dem Versand einer email verknüpfen. Die folgenden Informationen gelten für ein System &#8220;Ubuntu Jaunty Jackalope&#8221; und einen email-Account bei web.de, sollten jedoch auch grundsätzlich für andere Systeme gelten.</p>
<p><strong>Installation:</strong><br />
Neben &#8220;sendEmail&#8221; werden folgende Pakete benötigt:<br />
<strong>libio-socket-ssl-perl, libnet-ssleay-perl, perl</strong><br />
Unter Ubuntu werden alle benötigten Pakete  aus den Paketquellen installiert:</p>
<blockquote><p>sudo apt-get install sendEmail libio-socket-ssl-perl libnet-ssleay-perl perl</p></blockquote>
<p>Infos zur Installation des Tarballs finden sich auf der <a href="http://caspian.dotconf.net/menu/Software/SendEmail/">sendEmail Homepage.</a></p>
<p><strong>Mails senden:</strong><br />
Zum Versenden einer Mail muss man sich zunächst für einen SMTP-fähigen email-Account mit TLS-Unterstützung registriert haben. Eine reguläre email-Adresse bei web.de erfüllt diesen Zweck. Dabei bitte beachten, dass das Passwort zwar verschlüsselt übertragen wird, jedoch in der Bash-History bzw. im Shellscript im Klartext aufzufinden sind. Eine eigene Email-Adresse nur zu diesem Zweck zu registrieren, scheint also empfehlenswert. Im folgenden Beispiel wird die fiktive Adresse &#8220;username@web.de&#8221; verwendet. Die Mail wird per SMTP an web.de gesendet und von hier an die Empfangsadresse weitergeleitet.<br />
Am folgenden Beispiel soll verdeutlicht werden, wie &#8220;sendEmail&#8221; eine mail versendet:</p>
<blockquote><p>sendEmail -v -f username@web.de -s smtp.web.de:25 -xu username -xp totalgeheim -t adminempfaenger@gmx.de -o tls=yes -u &#8220;Betreff: Test!&#8221; -m &#8220;Hallo, dies ist ein Test!&#8221;</p></blockquote>
<p><strong>Die Optionen im Einzelnen:</strong><br />
-v   verbose: geschwätziger Modus (hilfreich zur Fehlersuche)<br />
-f    from: die Absenderadresse, von der die mail versandt werden soll (hier: username@web.de)<br />
-s    server&#38;port: Der zuständige SMTP-Server samt Portangabe<br />
-xu    username: Der Benutzername. (Manche Provider erwarten hier die komplette Emailadresse)<br />
-xp    password (SMTP): bei web.de das reguläre Benutzerpasswort<br />
-t    to: Empfängeradresse<br />
-cc    Kopie der Mail senden an: 2. Emailadresse<br />
-bcc    Versteckte Kopie der Mail senden an: 2. Emailadresse<br />
-o    hier: tls=yes &#8211; sorgt für eine verschlüsselte TLS-Übertragung<br />
-u    subject: Betreffzeile<br />
-m    message: Inhalt der Email<br />
-a    attachement: Pfad zu Dateianhang, der mitgesendet werden soll</p>
<p><strong>Weiterführende Infos:</strong><br />
Mit einem gmx-Account ist es mir nicht gelungen, mit sendEmail mails zu versenden (&#8220;Segmentation fault&#8221;). Wer weiß woran es hapert, kann gerne einen Kommentar hinterlassen. Ach ja: sendEmail scheint im Moment nur TLS, nicht aber SSL zu unterstützen.<br />
Ein schönes (englischsprachiges) Beispiel, wie man sich täglich Logdateien per email aus einer Kombination von sendEmail, shellscripting und cronjob senden lassen kann, ist in diesem <a href="http://ubuntuforums.org/showthread.php?p=7959018#post7959018">Tutorial</a> beschrieben, das kürzlich erschienen ist. Die sendEmail Homepage mit allen Optionen und mehr Informationen ist hier: <a href="http://caspian.dotconf.net/menu/Software/SendEmail/">sendEmail Homepage</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 5: Sendmail - Aliases]]></title>
<link>http://kiranjith.wordpress.com/2009/09/16/sendmail-notes-5-sendmail-aliases/</link>
<pubDate>Wed, 16 Sep 2009 18:50:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/16/sendmail-notes-5-sendmail-aliases/</guid>
<description><![CDATA[&nbsp;&nbsp;&nbsp; Aliases is used to handle mails to a non existing address. This will allow to red]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#160;&#160;&#160; Aliases is used to handle mails to a non existing address. This will allow to redirect the msgs destined to a given name to a real user.<br />eg:-
<p class="command"><i><b>postmaster: kiran@domain.com,jrkiran@domain.com</b></i></p>
<p>&#160;&#160;&#160; So when a mail comes in sendmail will check the aliases db for the aliases defined for new msgs, and according to the aliases defined sendmail attempts to deliver the msgs to the delivery agent by adding or modifying the headers of the msg with aliases defined in aliase db.</p>
<p><b><span style="font-size:large;">The Aliases File:</span></b><br />Default Aliases in system:
<p class="command"><i><b><br />MAILER-DAEMON:&#160; postmaster<br />postmaster:&#160;&#160;&#160; root</b></i></p>
<p>When a msg is bounced or problem delivering a msg the destination of the msg will be MAILER-DAEMON.<br />i.e, if a mail is send to a non existing user then the mail header is modified to MAILER-DAEMON as user.<br />This means the problem msg or bounced msg has to go some where, and sendmail delivers it to MAILER-DAEMON. <br />MAILER-DAEMON is aliased to postmaster, and postmaster aliased to root &#8211; hence the mail is delivered to root.</p>
<p><b>Aliases File is case insensitive</b>:<br />The aliases defined in sendmail is case insensitive. <br />After changing the aliases no need to restart or reload the sendmail&#160; service because in each and every request sendmail consults the db of aliases.</p>
<p><b><span style="font-size:large;">Types of aliases defined</span></b></p>
<p>There are 5 types of aliases:</p>
<p><b>1. 1-to-1 Aliases</b>.(1 alias map to one local username)<br />eg:- 
<p class="command"><i><b>postmaster:&#160;&#160;&#160; root<br />bin:&#160;&#160;&#160; root<br />support:&#160;&#160;&#160; kiran</i></b></p>
<p>&#160;&#160;&#160; 2. <b>1-to-many or 1-to-lists</b><br />eg:-
<p class="command"><i><b>info:&#160;&#160;&#160; kiran,jithu,rinz</span><br />sales:&#160;&#160;&#160; hr,joe,nick</span></b></i></p>
<p><b>&#160;&#160;&#160; 3. using include directive in aliases file.</b><br />This will allow aliases to include the list from separate file<br />eg:-
<p class="command"><i><b>finance:&#160;&#160;&#160; :include:/full/path/to/list.list</i></b></p>
<p>&#8220;users or mail address in the list file can be separated by comma.&#8221;<br />&#160;&#160;<b>&#160; 4. File Redirection Aliases &#8211; Re-route the message to file</b><br />eg:- 
<p class="command"><i><b>abuse:&#160;&#160;&#160; root,/var/log/abuse/mail<br />help:&#160;&#160;&#160; /var/log/help</b></i></p>
<p>&#160;&#160;&#160; All mail send to the user abuse will be re &#8211; routed in to /var/log/abuse/mail. This will help to collect the evidences of mail that is routed for given aliases. The file should not have the execute permission. Else sendmail will fail to write to this file<br /> <b>5.Redirecting the E-mail to PIPE (redirecting the output to an application)</b><br />&#160;&#160;&#160; when a mail comes we can send the output to certain commands. for example if mail comes for the user john and the is in vacation then we can redirect the mail to the program &#8220;vacation&#8221; to send the automated reply.<br />eg:-
<p class="command"><i><b>kiran:&#160;&#160;&#160; &#8220;&#124;/usr/bin/vacation kiran&#8221;</b></i></p>
<p><b><span style="font-size:large;">Creating a aliases</span></b><br /><b>Add entry</b>
<p class="command"><b><i>#vim /etc/mail/aliase</i></b><br /><i><b>support:&#160;&#160;&#160; kiran</b></i></p>
<p><b>Update db</b>
<p class="command"><i><b>#newaliases</b></i></p>
<p><b>Test the aliase file</b>
<p class="command"><i><b>#sendmail -bi </b></i></p>
<p><b>Test the aliase</b>
<p class="command"><i><b># sendmail -bv support</b></i><br /><i><b>kiran&#8230; deliverable: mailer local, user kiran</b></i></p>
<p>&#160;&#160;&#160; This means aliases support is deliverable, and it uses mailer local, and user who ultimately get msg.</p>
<p><b><span style="font-size:large;">Vacation Program</span></b><br />To enable the vacation program for an user called fazi install the vacation program that comes along with the sendmail binary.</p>
<p><b>Create a forward file</b>
<p class="command"><i><b># vim ~/.forward</b></i><br /><i><b>\fazi, &#8220;&#124;/usr/bin/vacation -t0 fazi&#8221;</i></b></p>
<p>Now create the msg that needed to be auto reply.
<p class="command"><b><i><span style="color:blue;"># vim ~/.vacation.msg</span></i></b><br /><i><b>Hi Thanks for you mail !</i><br /><i>hai i am on vacation<br />will ping you once i&#8217;m back</i></b></p>
<p>This will invoke an automated reply to the sender including the msg body from the file .vacation.msg.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 4 : Sendmail Logs Analyze]]></title>
<link>http://kiranjith.wordpress.com/2009/09/16/sendmail-notes-4-sendmail-logs-analyze/</link>
<pubDate>Wed, 16 Sep 2009 18:35:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/16/sendmail-notes-4-sendmail-logs-analyze/</guid>
<description><![CDATA[Mail logging configuration in syslog.conf #grep -i mail /etc/syslog.conf# Log anything (except mail)]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="font-size:large;"><b>Mail logging configuration in syslog.conf</b></span>
<p class="command"><b><i>#grep -i mail /etc/syslog.conf</i></b><br /><i># Log anything (except mail) of level info or higher.<br /><i><b>*.info;mail.none;authpriv.none;cron.none&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; /var/log/messages</i></b><br /># Log all the mail messages in one place.<br /><i><b>mail.*&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;;&#160;&#160;&#160;&#160;&#160;-/var/log/maillog</i></b></p>
<div style="color:black;"><span style="font-size:small;"><b>logging format of syslog.conf </b></span></div>
<p class="command"><i><b>#facility.severity &#160;&#160; destination </b></i></p>
<p>&#160;&#160;&#160; facility&#160;&#160;&#160;&#160;&#160; = mail, kern etc<br />&#160;&#160;&#160; severity &#160;&#160; =&#160; info,err,warn,debug<br />&#160;&#160;&#160; destination = /var/log/messages, /var/log/maillog</p>
<p>/var/log/messages will be logged other than all mail logs, i.e no maillogs will be logged to /var/log/messages and /var/log/maillog will be logged with all the mail activities.</p>
<p>To log the mail activities separately use the following option in <b><i>/etc/syslog.conf</i></b>
<p class="command"><i><b>mail.*&#160;&#160;&#160; &#160;&#160;&#160; -/var/log/mail<br />mail.info&#160;&#160;&#160; -/var/log/mail.info<br />mail.warning&#160;&#160;&#160; -/var/log/mail.warn<br />mail.err&#160;&#160;&#160; -/var/log/mail.err</i></b></p>
<p>This will log separately to each files</p>
<p><b><span style="font-size:large;">MailLog format:</span></b></p>
<p><b>Ack Log for msg received in MTA:</b>
<p class="command"><i><b><br />Sep 13 09:08:36 centos sendmail[6265]: n8D58YWM006265: from=, size=640, class=0, nrcpts=1, msgid=&#60;200909130508.n8D58Y1&#215;006264@centos.com&#62;, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]<br /></i></b></p>
<p>explore:<br />Daily Time stamp: message came from server: Daemon: Process ID: queue ID: From Server: size of message: class: number of recipient: msg id: relay=root@localhost (who has send the message from which host)</p>
<p><b>MSG Delivery Log:</b>
<p class="command"><i><b><br />Sep 13 09:08:36 centos sendmail[6268]: n8D58YWM006265: to=, ctladdr= (502/502), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30830, dsn=2.0.0, stat=Sent<br /></i></b></p>
<p>explore:<br />Time stamp:hostname:daemon:PID:queue ID: to=recipient:ctladdr=is the local user who sends the msg (ctladdr user ID /&#38; Group ID):delay=is expressed the amount of time between the msg recieved and delivered:xdelay=amount of time taken to transfer the msg (from user to user or host to host):mailer=the type of the mailer used in sendmail:pri=priority:dsn= Delivery Status Notification(Email Delivery Error Codes ):status=status of msg delivery&#160;</p>
<p><span style="font-size:large;"><b><span style="color:black;">Email Delivery Codes: Errors (Delivery Status Notification: DSN)</span></b></span><br />&#160;&#160;&#160; </p>
<p>How many times you got your outgoing emails back and wondered what is wrong with it? Every time when your email can not be delivered, the SMTP server sends you a notification, which includes a standard error message, associated with the real problem.<br />&#160;&#160;&#160;&#160; Each code is composed of three digits (X.X.X). The first digit gives the status of the email message:  <br />
<table border="0" cellpadding="10" cellspacing="10" class="text1" style="width:700px;" summary="Email Delivery Codes">
<tbody>
<tr>
<td>
<li>2 means the email was succesfully sent;</li>
<li>4 means there was a temporary problem while sending the email (your email server may try to send it again or you have to resend it, depending on your server settings). Such error messages are using codes like 4.X.X, where X.X are used in order to give more precise information about the error;</li>
<li>5 means there is a permanent/fatal error related to the email (the email address of the receiver does not exist, it doesn&#8217;t accept emails from you, etc). Such error messages are using codes like 5.X.X, where X.X are used in order to give more precise information about the error.</li>
<p>Here is a complete list of <b>email delivery error codes</b>, based on the Extended SMTP (ESMTP) standards, where X can be 4 or 5, depending on the error type (Persistent Transient or Permanent): 
<ul>
<li>       X.1.0     Other address status </li>
<li>       X.1.1     Bad destination mailbox address </li>
<li>       X.2.0     Bad destination system address </li>
<li>       X.1.3     Bad destination mailbox address syntax </li>
<li>       X.1.4     Destination mailbox address ambiguous </li>
<li>       X.1.5     Destination mailbox address valid </li>
<li>       X.1.6     Mailbox has moved </li>
<li>       X.1.7     Bad sender&#8217;s mailbox address syntax </li>
<li>       X.1.8     Bad sender&#8217;s system address </li>
</ul>
<ul>
<li>       X.2.0     Other or undefined mailbox status </li>
<li>       X.2.1     Mailbox disabled, not accepting messages </li>
<li>       X.2.2     Mailbox full </li>
<li>       X.2.3     Message length exceeds administrative limit. </li>
<li>       X.2.4     Mailing list expansion problem </li>
</ul>
<ul>
<li>       X.3.0     Other or undefined mail system status </li>
<li>       X.3.1     Mail system full </li>
<li>       X.3.2     System not accepting network messages </li>
<li>       X.3.3     System not capable of selected features </li>
<li>       X.3.4     Message too big for system </li>
</ul>
<ul>
<li>       X.4.0     Other or undefined network or routing status </li>
<li>       X.4.1     No answer from host </li>
<li>       X.4.2     Bad connection </li>
<li>       X.4.3     Routing server failure </li>
<li>       X.4.4     Unable to route </li>
<li>       X.4.5     Network congestion </li>
<li>       X.4.6     Routing loop detected </li>
<li>       X.4.7     Delivery time expired </li>
</ul>
<ul>
<li>       X.5.0     Other or undefined protocol status </li>
<li>       X.5.1     Invalid command </li>
<li>       X.5.2     Syntax error </li>
<li>       X.5.3     Too many recipients </li>
<li>       X.5.4     Invalid command arguments </li>
<li>       X.5.5     Wrong protocol version </li>
</ul>
<ul>
<li>       X.6.0     Other or undefined media error </li>
<li>       X.6.1     Media not supported </li>
<li>       X.6.2     Conversion required and prohibited </li>
<li>       X.6.3     Conversion required but not supported </li>
<li>       X.6.4     Conversion with loss performed </li>
<li>       X.6.5     Conversion failed </li>
</ul>
<ul>
<li>       X.7.0     Other or undefined security status </li>
<li>       X.7.1     Delivery not authorized, message refused </li>
<li>       X.7.2     Mailing list expansion prohibited </li>
<li>       X.7.3     Security conversion required but not possible </li>
<li>       X.7.4     Security features not supported </li>
<li>       X.7.5     Cryptographic failure </li>
<li>       X.7.6     Cryptographic algorithm not supported </li>
<li>       X.7.7     Message integrity failure</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Note:<br />For checking the mail log &#8211; Better to grep the queue id from maillog to check the msg status:
<p class="command"><i><b># grep queueid /var/log/maillog<br /># grep &#8220;Aug 15&#8243; /var/log/maillog</b></i></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Lead Technical Support Engineer]]></title>
<link>http://mindsourceinc.wordpress.com/2009/09/15/lead-technical-support-engineer/</link>
<pubDate>Wed, 16 Sep 2009 04:31:31 +0000</pubDate>
<dc:creator>Michelle</dc:creator>
<guid>http://mindsourceinc.wordpress.com/2009/09/15/lead-technical-support-engineer/</guid>
<description><![CDATA[Our client is seeking an experienced, self-motivated, flexible, team-oriented Lead Technical Support]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Our client is seeking an experienced, self-motivated, flexible, team-oriented Lead Technical Support Engineer to play a leadership role in the refinement of our support strategy and maintaining a high level of customer satisfaction for our existing customers.</p>
<p>This individual will be a part of a growing dedicated support team and will participate in all phases of the product lifecycle. The primary function of position is to assist our pre- and post-sale customers with technical issues and help others on the team with deeper technical questions.</p>
<p>The Lead Technical Support Engineer will need to respond to situations where first-line product support has failed to isolate or fix problems in malfunctioning equipment or software and assist other members of the team with very technical issues that need further troubleshooting before escalating to our client’s engineering department.  This person is also responsible for ensuring that customer relationships are managed through proactive rapid customer communication.</p>
<p>This is a highly technical role and deep knowledge of the Linux operating system and network configuration is required as well as expert level Sendmail administration experience, PERL debugging, shell scripting and deep MySQL expertise.  Resolving customer issues routinely includes working in complex product and infrastructure configurations; problem troubleshooting and isolation; performance tuning and optimization; training the customers on product features; and escalating product defects and issues and driving them towards resolution while managing the customer.</p>
<p>Summary of necessary skills:</p>
<ul>
<li>4+ years in a role with enterprise customer support responsibilities</li>
<li>Strong UNIX system administrator experience (Linux)</li>
<li>Expert level Sendmail system administration experience</li>
<li>Strong messaging infrastructure system administrator experience</li>
<li>System administrator level TCP/IP networking experience</li>
<li>Strong PERL experience</li>
<li>Strong Shell scripting</li>
<li>Deep MySQL expertise</li>
<li>Strong troubleshooting and problem solving skills</li>
<li>Strong customer satisfaction skills and a positive attitude</li>
<li>Strong written and verbal communication skills</li>
<li>2 + years in a leadership role</li>
<li>Communicate clearly and effectively across the support team</li>
<li>Able to persuade and influence others within support and development, and outside the group</li>
<li>Strong abilities in negotiation and conflict management</li>
<li>Secure Messaging experience a plus</li>
</ul>
<p>If you are interested in this position, please send your resume to <a href="mailto:tsotelo@mindsource.com?subject=I am interested in the Lead Technical Support Engineer position.">tsotelo@mindsource.com</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 3 - Sendmail msg delivery]]></title>
<link>http://kiranjith.wordpress.com/2009/09/15/sendmail-notes-3-sendmail-msg-delivery/</link>
<pubDate>Tue, 15 Sep 2009 18:18:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/15/sendmail-notes-3-sendmail-msg-delivery/</guid>
<description><![CDATA[&nbsp; Sendmail MTA decides whether the mail has to be delivered locally or remotely. if locally it ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>&#160; Sendmail MTA decides whether the mail has to be delivered locally or remotely. if locally it will place to the mail box or uses the SMTP protocol.And if the destination of the mail is remote then it delivers through the SMTP protocol.</p>
<p><span style="font-size:large;"><b>Local Mail Delivery:</b></span></p>
<p>Locally sendmail MTA places mails to /var/spool/mail/$USER<br />now the MUA (mutt/mail) (mail clients) will spool the mail from the /var/spool/mail/$USER and will place in the users home directory, either mbox or Maildir/</p>
<p><span style="font-size:large;"><b>Route of Local mail delivery:</b></span></p>
<p>sendmail -&#62; MSP (MSP sends to Clientmqueue directory) -&#62; MTA -&#62; sends the message described as in local mailer sends to procmail -&#62; /var/spool/mail -&#62; MailClient -&#62; $user home</p>
<p>&#160;Sendmail injects msgs to MSP which moniters the clientmqueue then msgs is taken by MTA which checks whether the mail is for local delivery or not. if so the MTA will invoke procmail which puts the msgs in the users mail box /var/spool/mail/$user according to procmail filter rules. Then the mail client copies the mail to users home directory. Usually the msg client reads the mail from /var/spool/mail/$user.</p>
<p><span style="font-size:large;"><b>Mailbox:</b></span></p>
<p><b>MBOX</b>:<br />mbox is the traditional way of saving messages in users home directory,Nearly all MTA&#8217;s and POP/IMAP daemons know how to deliver to mbox. This format simply appends each received message into a file called &#8220;inbox&#8221;. Out of the box, nearly all MTA&#8217;s will come configured this way, and it does have decent performance for a lightly loaded mailserver.</p>
<p><b>Maildir:</b><br />This sets up a directory structure whereby each message that is received is it&#8217;s own file. This is how most major mail hosting providers run their infrastructure. The reason being is that when a user checks their email, or the MTA has to deliver a newly received message, it does not have to open up a single file and append/read to/from it. This comes into play when a user has a lot of stored mail on the server.</p>
<p><b>Sending mail from shell</b></p>
<p><b><i>#sendmail -v kiran</i></b></p>
<p>&#160; will send the mail to user kiran.this will show the details in verbros.<br />Analyze the verbose output.<br />the out put which starts with &#8220;&#62;&#62;&#62;&#8221; indicates that the command is issued by local sendmail command<br />&#8220;250&#8243; &#8220;any 3 digit number&#8221; indicates that the command is done by MTA.<br />if the 3 digit is ending without &#8220;-&#8221;, this is the indication to the local mail client saying that the MTA server has finished its output.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 2 - Running Sendmail As MSP &amp; MTA]]></title>
<link>http://kiranjith.wordpress.com/2009/09/14/sendmail-notes-2-running-sendmail-as-msp-mta/</link>
<pubDate>Mon, 14 Sep 2009 19:02:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/14/sendmail-notes-2-running-sendmail-as-msp-mta/</guid>
<description><![CDATA[Sendmail As Mail-Submission-Program MSP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><span style="font-size:large;"><b>Sendmail As Mail-Submission-Program MSP</b></span></p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; In MSP mode sendmail will accept messages injected in to the queue from local users, scripts or program locally and delivers the msg when the msg deliver agent MTA is available.</p>
<p><b>Starting sendmail as MSP:</b><br /><i><b><br />#/usr/sbin/sendmail -L sm-msp-queue -Ac -q30m</b></i></p>
<p><b>-L&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </b>= Set&#160; the identifier used in syslog messages to the supplied tag<br /><b>sm-msp-queue</b> = Tag that denotes sendmail as running in msp queue mode, which accepts local msgs injected in to queue.<br /><b>-Ac</b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = instructs sendmail to use the alternate config file instead of sendmail.cf file, i.e the submit.cf file<br /><b>-q30m&#160;</b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = this is the queue runner, which will re run the queue after given time if the mail is delivered.</p>
<p><b>Now check the process is running successfully by</b><br /><b><i>#ps -ef &#124;grep sendmail</i></b><br />&#8212;&#8212;-<br />smmsp&#160;&#160;&#160;&#160; 3023&#160;&#160;&#160;&#160; 1&#160; 0 17:22 ?&#160;&#160;&#160;&#160;&#160;&#160;&#160; 00:00:00 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue<br />&#8212;&#8212;-<br /><b>sm-client.pid</b> is the file inside /var/spool/clientmqueue with the process id .<br /><b><br />Killing /stoping the sendmail</b></p>
<p><i><b>#cat sm-client.pid<br />#kill `cat sm-client.pid`</b></i><br />so the sendmail msp will be killed</p>
<p><b>Testing the sendmail as MSP</b><br /><b><br /><i><span style="color:blue;">#sendmail kiran</span></i></b></p>
<p>Now the mail will be accepted by MSP in the queue.<br />this wont be delivered to destination because now the MTA is not running in the machine. So it is queued under /<b><i>var/spool/clientmqueue</i></b><br />there are 2 types of files created in the clientmqueue director<br /><b>df*</b> = file contains the message body<br /><b>qf*</b> = file contains the message headers<br />So while running the sendmail in MSP mode it will accepts the messages from programs/users and for delivery/relay of the mail we need MTA.</p>
<p><b>To show the details of Logging Process of the mail program</b><br /><b><i>#grep -i mail /etc/syslogd.conf</i></b></p>
<p><b><span style="font-size:large;">Sendmail As Mail Transfer Agent &#8211; MTA</span></b></p>
<p><i><b># sendmail -L sm-mta -bd -q1h </b></i></p>
<p><b>-L sm-mta&#160; </b>= Set&#160; the identifier used in syslog messages to the supplied tag and name the tag as sm-mta<br /><b>-bd&#160;&#160;</b>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = Running sendmail daemon in background<br /><b>-q1hr&#160;&#160;</b>&#160;&#160;&#160;&#160;&#160;&#160;&#160; = queue refresh happens in every 1 hr</p>
<p>&#160; &#160; &#160; &#160; &#160; This will invoke sendmail as daemon and will bind to the port 25. </p>
<p><b>Now check the sendmail process in the system &#8211; <br /><i># ps -ef &#124;grep sendmail</i></b><br />smmsp&#160;&#160;&#160;&#160; 4725&#160;&#160;&#160;&#160; 1&#160; 0 18:46 ?&#160;&#160;&#160;&#160;&#160;&#160;&#160; 00:00:00 sendmail: Queue runner@00:30:00 for /var/spool/clientmqueue<br />root&#160;&#160;&#160;&#160;&#160; 5238&#160;&#160;&#160;&#160; 1&#160; 0 19:27 ?&#160;&#160;&#160;&#160;&#160;&#160;&#160; 00:00:00 sendmail: accepting connections</p>
<p>&#160;&#160;&#160; The first process concern with MSP which will accepts the messages from programs/users<br />&#160;&#160;&#160; The second Process runs as MTA which will run as Mail Transfer Agent</p>
<p><b>Now create the sendmail start up script to run the sendmail on boot. Refer the online sendmail startup scripts </b></p>
<p>To Clear the queue created by MSP while MTA was down kill the sendmail with MSP and re-run the sendmail as MSP this will force sendmail MSP to submit the mails in the clientmqueue to MTA.</p>
<p><b><i>#kill `cat sm-client.pid`<br />#sendmail -L sm-msp-queue -Ac -q30m</i></b></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[SENDMAIL Notes 1 - Installing Sendmail from Source Code]]></title>
<link>http://kiranjith.wordpress.com/2009/09/13/sendmail-notes-1-installing-sendmail-from-source-code/</link>
<pubDate>Sun, 13 Sep 2009 17:17:00 +0000</pubDate>
<dc:creator>kiranjith</dc:creator>
<guid>http://kiranjith.wordpress.com/2009/09/13/sendmail-notes-1-installing-sendmail-from-source-code/</guid>
<description><![CDATA[TopicsCompiling Installing and Testing Sendmail 1. Download sendmail &amp; GPG Key #wget ftp://ftp.s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><b><span style="font-size:large;">Topics</span></b><br /><b><span style="font-size:large;">Compiling Installing and Testing Sendmail<br /></span></b></p>
<p><b>1. Download sendmail &#38; GPG Key</b></p>
<p><b><i>#wget ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.14.2.tar.gz<br />#wget ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.14.2.tar.gz.sig</i></b></p>
<p><b>2. Download the GPG key and check the integrity of the file</b></p>
<p>Check md5sum <br /><b><i>#md5sum ssendmail.8.14.2.tar.gz<br />#md5sum ssendmail.8.14.2.tar.gz.sig</i></b><br />compare with md5sum in the website for both packages&#160; </p>
<p>GPG Key Check<br /><i><b>#gpg &#8211;import sendmail_gpgkeys<br />#gpg &#8211;verify sendmail.8.14.2.tar.gz.sig sendmail.8.14.2.tar.gz</b></i></p>
<p><b>3. Install sendmail</b></p>
<p><i>Step1:</i></p>
<p>Extract the downloaded archieve</p>
<p><i><b># tar -zxvf sendmail.8.14.2.tar.gz<br /># cd sendmail-8.14.2<br />#ls </b></i><br />&#160;&#160;&#160; Lists the folders inside the source code below are some important Folders inside the source code:<br />cf:<br />&#160;&#160; contains sample config files ideal for enviornment<br />contrib:<br />&#160;&#160; contains the source code provided by third party<br />doc:<br />&#160;&#160;&#160; documentations<br />libmilter:<br />&#160;&#160; plugins for clamav, spamassassin etc<br />makemap:<br />&#160;&#160; makemap utility for the configurations<br />mailstats:</p>
<p>sendmail:<br />&#160;&#160; contains the sourcefiles with the Bulid exicutable which uses for installation<br /><i><br />Step2:</i></p>
<p>Bulding the source code<br /><b><i>#cd sendmail-8.14/sendmail<br />#./Build<br />#cd ../obj.Linux.2.6.18-128.el5.i686/</i></b></p>
<p>&#160; This directory contains all the binaries &#38; object files</p>
<p><i>Step3:</i><br />&#160;Now go to other directories Build &#38; install the binaries &#38; configurations</p>
<p><b><i># cd ../cf/cf</i></b></p>
<p>&#160; Here we can find the platform specific configuration files of sendmail, each *.mc file contains corresponding *.cf file<br />so check for generic-linux.mc and copy to sendmail.mc file to create the configuration file. sendmail.cf file is used by sendmail while running as a MTA (mail Transmission Agent)<br />We need the submit.mc file as well. this file is used by sendmail while running as Mail Submission Program (MSP)<br />submit.mc is used while local mail submition to sendmail queue</p>
<p><i><b># cp generic-linux.mc sendmail.mc<br />#ls</b></i><br />&#160;&#160; now we have both mc files submit.mc &#38; sendmail.mc file in place</p>
<p><i><b># ./Build install-cf</b></i></p>
<p>&#160;(install-cf Installs the configuration files) This will run the m4 process which will export the submit.mc &#38; sendmial.mc to /etc/mail by creating the *.cf file</p>
<p><i><b># ls /etc/mail<br /></b></i><br />check the /etc/mail directory folders for the sendmail.cf and submit.cf file<br /><i><br />Step4:</i></p>
<p>Now add the user&#38;group so that a portion of sendmail can be run without the root privilage,the sendmail daemon runs with root privilages so this step is needed to avoid the security issue</p>
<p><i><b>#useradd smmsp<br />#groups smmsp</b></i></p>
<p><i>Step5:</i></p>
<p>Now install the main binary files<br /><b><i><br />#cd sendmail-8.14.2/sendmail<br />#./Build install<br />#ls -al /usr/sbin/sendmail</i></b></p>
<p><i>Step6:</i></p>
<p>Now go to directory makemap and build and install the makemap utility<br /><i><b>#cd ../makemap<br />#./Build<br />#./Build install</b></i></p>
<p><i>Step7:</i></p>
<p>Now go to mailstats directory &#8211; Build &#38; install mailstats<br /><i><b># cd ../mailstats/<br /># ./Build &#38;&#38; ./Build install</b></i></p>
<p><span style="color:blue;"><span style="color:black;"><b><span style="font-size:large;">Post Installation Chores:</span></b></p>
<p><b>Check the sendmail configurations and files are correct</b></span></span><br /><span style="color:blue;"><span style="color:black;"><br /><i><b># sendmail -v -bi</b></i><br />&#160;&#160; this will show the errors in configurations, permission problems, alias problems etc.</p>
<p>In my case it given error for /etc/mail/local-host-names &#38; /var/spool/mqueue/<br />so we need to define the file <i>/etc/mail/local-host-names</i><br />&#160;</span></span><br /><span style="color:blue;"><span style="color:black;"><b>Note: </b><br /></span></span><br /><span style="color:blue;"><span style="color:black;">When sendmail receives mail, it needs a way of determining whether it is responsible for the mail it receives. It uses the /etc/mail/local-host-names file to do this. This file has a list of hostnames and domains for which sendmail accepts responsibility. For example, if this mail server was to accept mail for the domains my-site.com and another-site then the file would look like this:<br />&#8212;&#8212;-<br />my-site.com<br />another-site.com<br />&#8212;&#8212;-<br /></span></span><br /><span style="color:blue;"><span style="color:black;"><br /><b>Create the local-host-name file</b></span></span><br /><span style="color:blue;"><span style="color:black;"><b>&#160;</b><br /><i><b>#echo &#8220;localhost&#8221; &#62; /etc/mail/local-host-names</b></i></p>
<p>When Sendmail functions as MTA it stores file in /var/spool/mqueue/ directory.So this directory is very much in need.</span></span><br /><span style="color:blue;"><span style="color:black;"><br /><b>in MTA</b>: If the mail delivery is not happening with respect to any config issues or unavailability of the mail destination the mails are stored in /var/spool/mqueue/ directory<br /><b>in MSP</b>: if mail delivery is not happening it stores mail in clientmqueue directory</p>
<p><i><b>#mkdir /var/spool/mqueue/<br />#chmod 700 /var/spool/mqueue/</p>
<p>#chown smmsp:smmsp /var/spool/clientmqueue<br />#chmod 770 /var/spool/clientmqueue</b></i></p>
<p>Now again run the sendmail checking utility<br /><b><i>#sendmail -v -bi</i></b></span></span><br /><span style="color:blue;"><span style="color:black;"><b><i>&#160;</i></b><br />If can see the /etc/mail/aliases file is missing, go to sendmail source code directory and copy the aliases file to /etc/mail and generate the db file of aliases</p>
<p><i><b>#cd sendmail.8.14/sendmail<br /># cp aliases /etc/mail/<br />#newaliases</b></i></span></span><br /><span style="color:blue;"><span style="color:black;"><i><b>&#160;</b></i><br />&#160;&#160;&#160; if the db converting tools (db4 &#38; db4-devel) are not installed before the sendmail compilation we have to install the db tools which is required for aliases databases creation, then recompile the sendmail source code to include the utility.</p>
<p>Now again run the sendmail checking utility<br /><b><i>#sendmail -v -bi</i></b></span></span></p>
<p><span style="color:blue;"><span style="color:black;"><span style="color:blue;">Now this gives the tottal number of aliases in the aliases file. This means that we have installed the sendmail packages correctly.</span><b><i> </i></b><br />&#160;</span></span><br /><span style="color:blue;"><span style="color:black;"><span style="font-size:large;"><b>Man page error while compiling</b></span><br />Because the sendmail assumes that the man page directory as /usr/man and normal linux systems uses /usr/share/man<br />so creating a soft link of /usr/share/man to /usr will solve this issue<br /><i><b>#ln -s /usr/share/man /usr</b></i></p>
<p>&#160;</span></span><br /><span style="color:blue;"><span style="color:black;">So using the same method we can install all the binaries  available with in the sendmail sorce-code to get a full fledged sendmail server.</span></span><br /><span style="color:blue;"><span style="color:black;">Note:-</span></span><br /><span style="color:blue;"><span style="color:black;">&#160; &#160;&#160; The /etc/hosts file should be updated properly to work sendmail smoothly.&#160;</span></span><i><b> <br /></b></i></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
