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

<channel>
	<title>El blog de LandM &#187; smtp-forward</title>
	<atom:link href="http://blog.landm.net/tag/smtp-forward/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.landm.net</link>
	<description>System Administrators and IT experts Blog</description>
	<lastBuildDate>Thu, 17 Jun 2010 08:34:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Qpsmtpd FAQ</title>
		<link>http://blog.landm.net/2008/12/qpsmtpd-faq/</link>
		<comments>http://blog.landm.net/2008/12/qpsmtpd-faq/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 11:37:31 +0000</pubDate>
		<dc:creator>lucas</dc:creator>
				<category><![CDATA[qpsmtpd]]></category>
		<category><![CDATA[auth]]></category>
		<category><![CDATA[auth_imap]]></category>
		<category><![CDATA[auth_smtpd]]></category>
		<category><![CDATA[badmailfromto]]></category>
		<category><![CDATA[cdb]]></category>
		<category><![CDATA[message]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[queue]]></category>
		<category><![CDATA[relay client]]></category>
		<category><![CDATA[relayclients]]></category>
		<category><![CDATA[rfc]]></category>
		<category><![CDATA[rhsbl]]></category>
		<category><![CDATA[smtp-forward]]></category>
		<category><![CDATA[validrcptto]]></category>

		<guid isPermaLink="false">http://blog.landm.net/?p=113</guid>
		<description><![CDATA[Life is easier since we use qpsmtpd. So we want to write some little tips about it.

How to queue messages ?

The easiest way to queue messages is use qmail-queue, but if you don&#8217;t have qmail, use your actual mail server in localhost and plugin smtp-forward:
queue/smtp-forward 127.0.0.1 25
Don&#8217;t forget to accept all mail from localhost and [...]]]></description>
			<content:encoded><![CDATA[<p>Life is easier since we use qpsmtpd. So we want to write some little tips about it.</p>
<ul>
<li><em>How to queue messages ?</em></li>
</ul>
<p>The easiest way to queue messages is use qmail-queue, but if you don&#8217;t have qmail, use your actual mail server in localhost and plugin smtp-forward:</p>
<p>queue/smtp-forward 127.0.0.1 25</p>
<p>Don&#8217;t forget to accept all mail from localhost and remove spam and antivirii from your mail server. Now your mail server is acting as <a title="Mail Delivery Agent" href="http://es.wikipedia.org/wiki/Mail_Delivery_Agent">MDA</a>. Let qpsmtpd do all filters (antispam, antivirii, &#8230;).</p>
<ul>
<li><em>Auth plugins</em></li>
</ul>
<p>Try to use standard method like smtpd or imap. It will allow you to change any piece of software whenever without affect your qpsmtpd setup.</p>
<p>auth/auth_imap 127.0.0.1 993</p>
<p>auth/auth_smtpd 127.0.0.1 25</p>
<ul>
<li><em>Check valid rcptto</em></li>
</ul>
<p>Maybe the most important plugin to avoid dictionary attacks. There are scripts to extract valid users from qmail installation: John M. Simpson has some scripts to dump all users to a cdb file. <a title="mkvalidrcptto" href="http://qmail.jms1.net/scripts/mkvalidrcptto.shtml">Link</a></p>
<p>But if you don&#8217;t have qmail you have to do two things in order to have qpsmtpd workproperly:</p>
<ol>
<li>Dump all domains into config/rcpthosts file. Use shell or perl scripts.</li>
<li>Dump all valid users into validrcptto.cdb file. Don&#8217;t forget this file is a <a title="cdb" href="http://cr.yp.to/cdb.html">cdb</a>. There are <a title="cdbmake" href="http://cr.yp.to/cdb/cdbmake.html">tools (like cdbmake)</a> to help you to build a cdb file. Send the valid list to a pipe like this :</li>
</ol>
<p>E.g.: perl getValidUsers.pl |/usr/local/bin/cdbmake-12 /opt/qpsmtpd/config/validrcptto.cdb /opt/qpsmtpd/validrcptto.tmp</p>
<p>And you will have a validrcptto.cdb file. Be careful and don&#8217;t forget mailing lists!!!.</p>
<p>When you have the file generated add this line:</p>
<p>check_validrcptto_cdb /opt/qpsmtpd/config/validrcptto.cdb -</p>
<p>before rcpt_ok plugin</p>
<ul>
<li><em>How to stop mails from an address to a valid users.</em></li>
</ul>
<p>Use this plugin: check_badmailfromto</p>
<p>Create a file (config/badmailfromto) with two columns: from to (separated with 	ab)</p>
<p>That&#8217;s all. Easy as qpsmtpd.</p>
<ul>
<li><em>How to accept mails from a relay client.</em></li>
</ul>
<p>First of all be sure the relay client is a trust client. To accept all mail from the ip, include the ip in config/relayclients file. But the best way to do it is authenticate the client via standard method.</p>
<ul>
<li><em>How to accepts mails from servers that don&#8217;t use rfc.<br />
</em></li>
</ul>
<p>Strange?, not at all. We are in Spain where an official mail server (Seguridad Social) doesn&#8217;t respect rfc. So we had to remove rhsbl plugin from our config.</p>
<ul>
<li><em>How to avoid spamassassin for relay clients.</em></li>
</ul>
<p>Just add this lines in hook_data_post method, after this line:</p>
<p>return (DECLINED) if $transaction-&gt;data_size &gt; 500_000;</p>
<p>The code:</p>
<p>&#8230;</p>
<p>if ( $self-&gt;qp-&gt;connection-&gt;relay_client ) {<br />
# failsafe<br />
$self-&gt;log(LOGALERT, &#8220;Allowing relay client past spamassassin&#8221;);<br />
return (DECLINED);<br />
}</p>
<p>&#8230;</p>
<p>So, if it is a relayed client it doesn&#8217;t send the message to spamassassin daemon.<span id="more-113"></span></p>
<p style="text-align: left;"><!--more--></p>
<p style="text-align: left;">As you can see, qpsmtpd is powerful and easy to configure. Give it a chance. Since we use it we are very confident of our mail service and proud of performance. In another post we will comment some tips about performance.</p>
<p style="text-align: left;">The <a title="qpsmtpd plugins" href="http://wiki.qpsmtpd.org/plugins">plugin page</a> must be your reference when implementing qpsmtpd. There is a lot of information about all you need. Thank <a title="Ask" href="http://www.askbjoernhansen.com/">Ask Bjørn Hansen</a> and the active community very much for your work.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.landm.net/2008/12/qpsmtpd-faq/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
