<?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>Christopher J. Buckley &#187; MailServer</title>
	<atom:link href="http://www.cjbuckley.net/blog/category/mailserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cjbuckley.net/blog</link>
	<description>Free-Software, GNU/Linux, Traffic Management &#38; Thoughts</description>
	<lastBuildDate>Mon, 16 Mar 2009 16:18:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Postfix: $relayhost and port 587</title>
		<link>http://www.cjbuckley.net/blog/2007/08/23/postfix-relayhost-and-port-587/</link>
		<comments>http://www.cjbuckley.net/blog/2007/08/23/postfix-relayhost-and-port-587/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 15:30:37 +0000</pubDate>
		<dc:creator>Christopher Buckley</dc:creator>
				<category><![CDATA[MailServer]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/08/23/postfix-relayhost-and-port-587/</guid>
		<description><![CDATA[This quick article concerns using the relayhost variable to allow postfix to relay into the submission port (587), rather than the smtp port (25).
When using a separated tier network of postfix servers, ie &#8211; a cluster at the front, which receive from a cluster in a segmented network, you will need to use the relayhost [...]]]></description>
			<content:encoded><![CDATA[<p>This quick article concerns using the <tt>relayhost</tt> variable to allow <a href="http://www.postfix.org/">postfix</a> to relay into the <a href="http://www.faqs.org/rfcs/rfc2476.html">submission port</a> (587), rather than the <a href="http://www.faqs.org/rfcs/rfc2821.html">smtp port</a> (25).</p>
<p>When using a separated tier network of postfix servers, ie &#8211; a cluster at the front, which receive from a cluster in a segmented network, you will need to use the <tt>relayhost</tt> variable to daisy link the two clusters together.  Usually, you may be tempted to simply submit on port 25.  This was previously acceptable, but now a concerted drive is being made towards the correct port &#8211; 587.  When using <a href="http://en.wikipedia.org/wiki/DKIM">DKIM</a> implementations such as <a href="http://jason.long.name/dkimproxy/">DKIM proxy </a> mail will not be signed on port 25 without some hackery in master.cf [<u>this is strongly advised against</u>].  As Jason states:</p>
<blockquote><p>
. . .The point is we don&#8217;t want to sign mail from untrusted sources, and that&#8217;s what could happen if you direct that mail through dkimproxy.out.
</p></blockquote>
<p>So how do we ensure our chain of servers signs mail submitted?  Easy!</p>
<pre>
relayhost = [smtp.domain.tld]:587
</pre>
<p>You can now sit back and watch as all your mail is digitally signed by what-ever DKIM implementation you have chosen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/08/23/postfix-relayhost-and-port-587/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plusnet: a lesson on how -not- to do e-mail</title>
		<link>http://www.cjbuckley.net/blog/2007/08/23/plusnet-a-lesson-on-how-not-to-do-e-mail/</link>
		<comments>http://www.cjbuckley.net/blog/2007/08/23/plusnet-a-lesson-on-how-not-to-do-e-mail/#comments</comments>
		<pubDate>Thu, 23 Aug 2007 14:34:01 +0000</pubDate>
		<dc:creator>Christopher Buckley</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[MailServer]]></category>
		<category><![CDATA[cock-ups]]></category>
		<category><![CDATA[e-mail]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/08/23/plusnet-a-lesson-on-how-not-to-do-e-mail/</guid>
		<description><![CDATA[Plusnet in cock-up shocka &#8211; again!  el reg brings word of another spectacular cockup success from plusnet;this time implementing a spam filter appliance.

PlusNet, the terminally scatterbrained ISP, has permanently deleted customers&#8217; email again after it bungled the installation of an anti-spam appliance, it admitted this morning.
The Sheffield firm said it had blackholed about 10 [...]]]></description>
			<content:encoded><![CDATA[<p><u>Plusnet in cock-up shocka &#8211; again!</u>  <a href="http://www.theregister.co.uk/">el reg</a> brings word of another <a href="http://www.theregister.co.uk/2007/08/23/plusnet_deletes_again/">spectacular <strike>cockup</strike> success from plusnet;</a>this time implementing a spam filter appliance.</p>
<blockquote><p>
PlusNet, the terminally scatterbrained ISP, has permanently deleted customers&#8217; email again after it bungled the installation of an anti-spam appliance, it admitted this morning.</p>
<p>The Sheffield firm said it had blackholed about 10 per cent of the backlog of mail which built up yesterday daytime while its engineers worked on the appliance. The same proportion of legitimate mails between 5pm and 11pm was also wrongly earmarked and binned.</p>
<p>An update this morning said: &#8220;These mails will not be recoverable and we recommend customers who have not received email that was sent yesterday to ask the sender to re-send where possible.&#8221; So, if you you were sent an email that you never received by an unknown person about an unknown subject, give them a bell and tell them to send it again.</p>
<p>The system is now working again, it adds.</p>
<p>We&#8217;ve lost count of the number of times we&#8217;ve had to write about PlusNet screwing up their email system in the last year, and imagine customers have lost patience. Let us know your questions for the company in our comments section.</p>
<p>PlusNet say they don&#8217;t want to answer any of The Register&#8217;s own questions, and instead emailed us a pre-prepared statement&#8230;
</p></blockquote>
<p>I mean, <b>really</b>!  How can they be so totally useless? And why do they still have any customers? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/08/23/plusnet-a-lesson-on-how-not-to-do-e-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SpamAssassin: How to protect against current spam attacks</title>
		<link>http://www.cjbuckley.net/blog/2007/08/20/spamassassin-how-to-protect-against-current-spam-attacks/</link>
		<comments>http://www.cjbuckley.net/blog/2007/08/20/spamassassin-how-to-protect-against-current-spam-attacks/#comments</comments>
		<pubDate>Mon, 20 Aug 2007 17:26:44 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MailServer]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mailscanner]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamassassin]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/08/20/spamassassin-how-to-protect-against-current-spam-attacks/</guid>
		<description><![CDATA[Currently, there are four major spam attacks postmasters are being faced with.  They include, but are not limited to:

PDF &#038; FDF: usually a blank e-mail with a PDF attachment.
Greeting Card: invitations from an &#8216;old friend&#8217; to go to a website with a numerical http address, usually containing malware.
Image Spam: A gif or png attached [...]]]></description>
			<content:encoded><![CDATA[<p>Currently, there are four major spam attacks postmasters are being faced with.  They include, but are not limited to:</p>
<ul>
<li><strong>PDF &#038; FDF:</strong> usually a blank e-mail with a PDF attachment.</li>
<li><strong>Greeting Card:</strong> invitations from an &#8216;old friend&#8217; to go to a website with a numerical http address, usually containing malware.</li>
<li><strong>Image Spam:</strong> A gif or png attached to a, usually &#8211; though not always, blank e-mail ready to sell the latest software or stock.</li>
<li><strong>Obfuscate Words:</strong> Lines of text take this format, <tt>N o*t o,n-l-y d o-e's t,h+i s f i+r*m h+a'v_e grea_t fundamenta,ls*,</tt>.
</li>
</ul>
<p>I&#8217;m going to show you how using the <a href="http://en.wikipedia.org/wiki/Free_software">free-software</a> package, <a href="http://spamassassin.apache.org/">SpamAssassin</a>, you can successfully neuter these 4 major spam attacks.</p>
<ul>
<li><strong>Greeting Card:</strong> Can be easily defeated using <a href="http://www.impsec.org/~jhardin/antispam/postcards.cf">postcards.cf</a>.</li>
<li><strong>Image Spam:</strong> These quickly become extremely popular, but have now decreased in prevalence after very successful methods were implemented to combat them.  For SA, use the module <a href="http://www.rulesemporium.com/plugins.htm">Imageinfo</a>: <a href="http://www.rulesemporium.com/plugins/ImageInfo.pm">Imageinfo.pm </a> and <a href="http://www.rulesemporium.com/plugins/imageinfo.cf">Imageinfo.cf </a> supplied by <a href="http://www.rulesemporium.com/plugins.htm">SARE Rules Emporium</a>.</li>
<li><strong>PDF &#038; FDF:</strong> Can be successfully discarded by using <a href="http://www.rulesemporium.com/plugins/PDFInfo.pm">PDFInfo.pm</a> and <a href="http://www.rulesemporium.com/plugins/pdfinfo.cf">PDFInfo.cf</a> again supplied by <a href="http://www.rulesemporium.com/plugins.htm">SARE Rules Emporium</a>.</li>
<li><strong>Obfuscate Words:</strong> These have recently hit, and hit hard.  Spammers, seemingly bewildered by their inability to get through current filters using the above popular methods, have now resorted to the old way of securing spam delivery: obfuscation.  The good news is that this, again, is easily defeatable.  The ruleset(s) originally written by <a href="http://www.emtinc.net/spamhammers.htm">Jennifer Wheeler</a> are mirrored locally by this site.
<ol>
<li><a href="/uploads/spam-filters/chickenpox.cf">chickenpox.cf</a>: [words obfuscated by non word characters] <b>Th</b>1<b>s</b>|<b>s</b> <b>a</b> <b>v</b>3<b>ry</b> <b>h</b>4<b>ndy</b> <b>se</b>7 <b>t</b>0 <b>c</b>@<b>tch</b> <b>th</b>!<b>s</b> 50<b>rt</b> 0<b>f</b> (<b>rap</b>.
            </li>
<li><a href="/uploads/spam-filters/backhair.cf">backhair.cf</a>: [words obfuscated by nonsense html tags]&nbsp;<br />
<b>Y</b><font color="#FF00FF">&lt;oivugriub&gt;</font><b>ou</b><b>cou</b><font color="#FF00FF">&lt;iuqgheriugv9h&gt;</font><b>ld</b> <b>rea</b><font color="#FF00FF">&lt;y&gt;</font><b>lly</b><b>u</b><font color="#FF00FF">&lt;owiuer88&gt;</font><b>se</b> <b>this</b>.
           </li>
</ol>
</li>
</ul>
<p>Game on, spammers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/08/20/spamassassin-how-to-protect-against-current-spam-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RT, Postfix &amp; Virtual Domains: Problems faced and a solution!</title>
		<link>http://www.cjbuckley.net/blog/2007/08/19/rt-postfix/</link>
		<comments>http://www.cjbuckley.net/blog/2007/08/19/rt-postfix/#comments</comments>
		<pubDate>Sun, 19 Aug 2007 04:59:56 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MailServer]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[Request Tracker]]></category>
		<category><![CDATA[Rewrite]]></category>
		<category><![CDATA[RT]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Virtual Domains]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/08/19/rt-postfix/</guid>
		<description><![CDATA[Request Tracker is an enterprise grade ticketing system developed by Best Practical. RT is used by Fortune 100 companies, government agencies, educational institutions, and development organizations worldwide.  Many implementations of RT run behind the Postfix mail-server.
The RT wiki has instructions on setting up your MTA to &#8216;pipe&#8217; the e-mails into RT:
You need to tell [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bestpractical.com/rt/">Request Tracker</a> is an enterprise grade ticketing system developed by Best Practical. RT is used by Fortune 100 companies, government agencies, educational institutions, and development organizations worldwide.  Many implementations of RT run behind the <a href="http://www.postfix.org/">Postfix</a> mail-server.</p>
<p>The <a href="http://wiki.bestpractical.com/view/ManualInstallation">RT wiki</a> has instructions on setting up your MTA to &#8216;pipe&#8217; the e-mails into RT:</p>
<p>You need to tell your Mail Transfer Agent (ex sendmail, postfix, or qmail) how to forward messages to RT&#8217;s mail gateway. To do this, create an aliases in your system&#8217;s mail aliases file. Here&#8217;s an example, which routes mail to the mailbox [=rt@example.com] (and [=rt-comment@example.com]) into new tickets in the RT queue named General. Note that the queue name is case-insensitive.</p>
<p>Add the following lines to /etc/aliases (or your local equivalent such as /etc/mail/aliases):</p>
<p><tt>rt: "|/opt/rt3/bin/rt-mailgate --queue general --action correspond --url http://localhost/rt"<br />
rt-comment: "|/opt/rt3/bin/rt-mailgate --queue general --action comment --url http://localhost/rt"<br />
</tt><br />
These instructions are accurate, but rely on Postfix not having implemented <a href="http://www.postfix.org/VIRTUAL_README.html">Virtual Domains</a>.  Here&#8217;s an example configurationfrom <tt>main.cf</tt> where virtual domains have been implemented:</p>
<p><tt>virtual_transport = virtual<br />
virtual_uid_maps = static:5000<br />
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf<br />
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf<br />
</tt></p>
<p>This configuration will invoke the <tt><a href="http://www.postfix.org/virtual.8.html">virtual</a></tt> transport within Postfix.  A <tt>virtual</tt> transport is unable to perform the necessary <tt><a href="http://en.wikipedia.org/wiki/Vertical_bar">pipe</a></tt> (&#8220;|&#8221;) to the <tt><a href="http://linux.die.net/man/1/rt-mailgate">rt-mailgate</a></tt> binary.  Only the <tt><a href="http://www.postfix.org/local.8.html">local</a></tt> transport is able to perform a <tt>pipe</tt>. So, the question is: <u>how do we run virtual domain(s), but still invoke the <tt>local</tt> transport delivery method to successfully perform the <tt>pipe</tt> into <tt>rt-mailgate</tt>?</u></p>
<h2>A Virtual to Local Rewrite Solution</h2>
<p>Here&#8217;s a quick walkthrough on what steps you need to put in place to ensure that a mail to the (virtual) domain of  rt-test@domain.tld is successfully piped as per the RT wiki instructions above.  </p>
<ol>
<li>Create an <tt>/etc/postfix/aliases</tt> file.</li>
<li>Within this file add entries that follow this format:
<pre>
rt-test                       rt@rt.domain.tld
support                       support@rt.domain.tld
abuse                         abuse@rt.domain.tld
# and so on...
</pre>
</li>
<li><tt><a href="http://www.postfix.org/postmap.1.html">postmap</a> /etc/postfix/aliases</tt></li>
<li>Within <tt>/etc/aliases</tt> create the pipe aliases referred to in the RT wiki:
<pre>
support: "|/opt/rt3/bin/rt-mailgate --queue 'Support' --action &#92;
correspond --url http://rt.domain.tld/"
rt: "|/opt/bin/rt-mailgate --queue 'General' --action &#92;
correspond --url http://rt.domain.tld/"
abuse: "|/opt/rt3/bin/rt-mailgate --queue 'Abuse'  --action &#92;
correspond --url http://rt.domain.tld/"
# Ensure there are no line breaks..
</pre>
</li>
<li>Run the <tt><a href="http://linux.about.com/library/cmd/blcmdl1_newaliases.htm">newaliases</a></tt> command.</li>
<li>Insert the appropriate configuration amendments to <tt>main.cf</tt>
<pre>
# To ensure <tt>local</tt> delivery, <tt>rt.domain.tld</tt> must be added to
# <tt><a href="http://www.postfix.org/basic.html">$mydestination</a></tt>
mydestination = localhost localhost.localdomain rt.domain.tld
# <tt>/etc/postfix/aliases</tt> is added:
virtual_alias_maps = hash:/etc/postfix/aliases
mysql:/etc/postfix/mysql_virtual_alias_maps.cf
# alias_maps is what is READ by delivery agents etc.
alias_maps = hash:/etc/aliases
# alias_databases is what is WRITTEN by newaliases
alias_database = hash:/etc/aliases
# masquerade as @rt.example.com unless also on this list,never root
masquerade_domains = rt.domain.tld
masquerade_exceptions = root
</pre>
</li>
<li>Save the file, then reload Postfix&#8217;s configuration: <tt>/etc/init.d/postfix reload</tt></li>
<li>Send an e-mail to <tt>support@domain.tld</tt> and observe Postfix working its wonders..<br />
<tt><br />
Aug 19 21:12:18 solo postfix/local[2972]: 2B91710EB92: to=&lt;support @rt.domain.tld&gt;, orig_to=&lt;support@cjbuckley.net&gt;, relay=local, delay=17, delays=17/0.05/0/0.54, dsn=2.0.0, status=sent (delivered to command: /opt/rt3/bin/rt-mailgate --queue 'Support' --action correspond --url http://rt.domain.tld/)</tt></li>
</ol>
<p>I wrote this article mainly because I see the question oft repeated on the <a href="http://archives.neohapsis.com/archives/postfix/">Postfix Users Mailing List</a>.   Any comments and (especially) improvements welcome. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/08/19/rt-postfix/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>DynDNS finally publishes backup MX IP list</title>
		<link>http://www.cjbuckley.net/blog/2007/08/03/dyndns-finally-publishes-backup-mx-ip-list/</link>
		<comments>http://www.cjbuckley.net/blog/2007/08/03/dyndns-finally-publishes-backup-mx-ip-list/#comments</comments>
		<pubDate>Fri, 03 Aug 2007 10:49:03 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MailServer]]></category>
		<category><![CDATA[Backup MX]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[dyndns]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/08/03/dyndns-finally-publishes-backup-mx-ip-list/</guid>
		<description><![CDATA[DynDNS are a major player in both e-mail and DNS outsource solutions, both for home and corporate customers.  The DNS for cjbuckley.net, for instance, is outsourced to DynDNS.   Previously, DynDNS refused to publish their IP list for their backup MX services.  Existing mail-servers that check (be it at MTA or Content-Filter [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.dyndns.com/">DynDNS</a> are a major player in both e-mail and DNS <a href="http://www.dyndns.com/services/">outsource solutions</a>, both for home and corporate customers.  The DNS for cjbuckley.net, for instance, is outsourced to DynDNS.   Previously, DynDNS refused to publish their IP list for their backup MX services.  Existing mail-servers that check (be it at MTA or Content-Filter level) SPF TXT record validity, and employ DynDNS&#8217;s backup MX service were currently unable to SPF whitelist their backup MX 100% accurately.  But why would you wish to white-list?  I think a quick history over-view would be prudent&#8230;</p>
<h2>Overview</h2>
<p>Since SPF become a permanent extension to the SMTP RFC, domain&#8217;s wishing to have their e-mail accepted by both the &#8216;big three&#8217; (Yahoo, Hotmail, GMail) and other well-run mail-servers must be sure to <a href="http://old.openspf.org/wizard.html">publish their SPF record(s)</a>.  </p>
<p>SPF is not without it&#8217;s critics, however.  SPF, currently, <a href="http://homepages.tesco.net/J.deBoynePollard/FGA/smtp-spf-is-harmful.html">breaks more than it fixes</a>.   From a personal view-point, I agree entirely with these points:</p>
<ol>
<li><a href="http://homepages.tesco.net/J.deBoynePollard/FGA/smtp-spf-is-harmful.html#PreDeliveryForwarding">SPF breaks pre-delivery forwarding</a></li>
<li><a href="http://homepages.tesco.net/J.deBoynePollard/FGA/smtp-spf-is-harmful.html#DatabaseSecurity">SPF relies upon DNS for security, but DNS isn&#8217;t a security service</a></li>
<li><a href="http://homepages.tesco.net/J.deBoynePollard/FGA/smtp-spf-is-harmful.html#WrongProblem">SPF doesn&#8217;t actually address unsolicited bulk mail at all</a></li>
</ol>
<p><a href="http://homepages.tesco.net/J.deBoynePollard/FGA/smtp-spf-is-harmful.html#PreDeliveryForwarding">Point 1</a> is significant.  </p>
<p>The <a href="http://www.openspf.org/FAQ/Common_receiver_mistakes#whitelist">SPF FAQ states</a> that:</p>
<blockquote><p>
<em><u>Checking SPF On Forwarded Mail</u></em></p>
<p><em>Mail forwarding is set up by the receiver and so for forwarded mail, the border mail server (at which SPF should be checked) the the forwarder&#8217;s mail server. If you check SPF on your mail server it is coming from your forwarder and not from a mail server authorized by the sending domain. Technically this is similar to checking SPF against mail relayed from your secondary MX like discussed in the previous item. Authorized forwarders should be whitelisted against SPF checks to avoid this problem.</em>
</p></blockquote>
<h2>DynDNS addresses this problem</h2>
<p>If you are using a backup MX service, you will need, as per instructions above, to SPF white-list the backup MX (ie, all IP addresses from which it may send e-mail to your primary MX record).  To not do so creates the situation that -all- mail going to your backup MX will be subject to a negative score upon receipt to your primary MX.  </p>
<p>As talked about at the start of this article, DynDNS previously refused to publish their IP list for backup MX, stating categorically that they would &#8216;not publish&#8217; this list.  I am glad to see they have finally seen sense and allowed postmasters responsible for corporate (and personal) mail-servers the ability to white-list this important MX record.</p>
<h2>Enough talk &#8211; how do I whitelist within Postfix?</h2>
<p>If you&#8217;re running Postfix, you will almost certainly have implemented <a href="http://www.openspf.org/svn/software/postfix-policyd-spf-perl/tags/2.004/">postfix-policyd-spf-perl</a>.  </p>
<ol>
<li> Edit /usr/lib/postfix/postfix-policyd-spf-perl</li>
<li> Ensure the relevant line(s) read the same as: </li>
</ol>
<p><tt><br />
use constant relay_addresses => map(<br />
    NetAddr::IP->new($_),<br />
    qw( 204.13.249.0/24  208.78.69.71/32 208.78.69.72/32 208.78.69.73/32 208.78.69.74/32 ) );<br />
    # add addresses to qw (  ) above separated by spaces using CIDR notation.<br />
</tt></p>
<p>You&#8217;ve now successfully white-listed DynDNS&#8217;s backup servers, and will not suffer from SPF&#8217;s ability to break pre-delivery forwarding.  </p>
<h2>Final Points</h2>
<p>Before anyone mentions <a href="http://www.openspf.org/SRS">SRS</a>: it&#8217;s broken. It doesn&#8217;t work, as i write, within Postfix.  Plus, <a href="http://www.irbs.net/internet/postfix/0401/1020.html">it&#8217;s a -huge- hack</a>. </p>
<p>I&#8217;ve resisted the temptation to mention <a href="http://en.wikipedia.org/wiki/DomainKeys">DKIM</a>, until now.  DomainKeys does not suffer from the same problem i&#8217;ve written above that SPF does.  There are explanations of how DomainKeys work both at <a href="http://en.wikipedia.org/wiki/DomainKeys">Wikipedia</a> and <a href="http://antispam.yahoo.com/domainkeys">Yahoo!</a>  This domain, and all others I am responsible for,  both sign and check e-mails for DKIM/DomainKey signatures.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/08/03/dyndns-finally-publishes-backup-mx-ip-list/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MailScanner &amp; Password Protected Archives</title>
		<link>http://www.cjbuckley.net/blog/2007/07/25/mailscanner-password-protected-archives/</link>
		<comments>http://www.cjbuckley.net/blog/2007/07/25/mailscanner-password-protected-archives/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 12:02:03 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[MailServer]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mailscanner]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/07/25/mailscanner-password-protected-archives/</guid>
		<description><![CDATA[Today at work I encountered an interesting &#8216;problem&#8217; on our Ubuntu 6.06 LTS mail-server. I deploy MailScanner 4.51.5 across our cluster, which after a good initial configuration sits 24/7/365 unattended.  Today a user reported that password protected archives were being removed before Postfix attempted delivery.
I know from knowledge of MailScanner that the default conf [...]]]></description>
			<content:encoded><![CDATA[<p>Today at work I encountered an interesting &#8216;problem&#8217; on our Ubuntu 6.06 LTS mail-server. I deploy <a href="http://www.mailscanner.info/ChangeLog/">MailScanner 4.51.5</a> across our cluster, which after a good initial configuration sits 24/7/365 unattended.  Today a user reported that password protected archives were being removed before <a href="http://www.postfix.org/">Postfix</a> attempted delivery.</p>
<p>I know from knowledge of MailScanner that the default conf file blocks password protected archives by default.  However, upon looking in the conf file I did not see the entry to over-ride this.   Knowing that this over-ride entry exists I checked the conf file on my home e-mail server from <a href="http://www.mailscanner.info/">MailScanner 4.60</a> . </p>
<pre>
chris@solo> grep 'Password' /etc/MailScanner/MailScanner.conf
Allow Password-Protected Archives = no
</pre>
<p>Interestingly, this attribute is <i>not</i> present in the <a href="https://launchpad.net/ubuntu/+source/mailscanner/4.51.5-1ubuntu1">Ubuntu package of MailScanner</a></p>
<h2>How To Add Exceptions To Password Protected Archives</h2>
<ol>
<li>Within <tt>/etc/MailScanner/MailScanner.conf</tt> add entry:<br />
      <tt>Allow Password-Protected Archives = %rules-dir%/password.protected.rules</tt></li>
<li>Create the file <tt>/etc/MailScanner/rules/password.protected.rules</tt></li>
<li>Within this file add entries for IP&#8217;s or e-mail addresses you wish to allow password protected archives from.  An example of this file could be:<br />
<tt><br />
From:          152.78.         yes<br />
From:          130.246.        yes<br />
From:           chris.buckley@domain.tld        yes<br />
FromorTo:       allow-zips@domain.tld            yes<br />
FromOrTo:       default         no<br />
</tt>
    </li>
<li>Save this file, then restart MailScanner.</li>
</ol>
<p><b>NB:</b> Post updated, see Julian&#8217;s comment below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/07/25/mailscanner-password-protected-archives/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DKIM, Domain-Keys and SPF verification</title>
		<link>http://www.cjbuckley.net/blog/2007/07/10/dkim-domain-keys-and-spf-verification/</link>
		<comments>http://www.cjbuckley.net/blog/2007/07/10/dkim-domain-keys-and-spf-verification/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 17:56:28 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[MailServer]]></category>
		<category><![CDATA[DKIM]]></category>
		<category><![CDATA[Domain Keys]]></category>
		<category><![CDATA[e-mail]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SPF]]></category>

		<guid isPermaLink="false">http://www.cjbuckley.net/blog/2007/07/10/dkim-domain-keys-and-spf-verification/</guid>
		<description><![CDATA[Whilst recently implementing DKIM and SPF for both my personal domain e-mail and for the corporate mail-servers I am responsible for, I found a great verification e-mail box from the DKIM mailing list.
If, after setting up your new extensions to the SMTP protocol, you wish to verify everything is working correctly then I thoroughly recommend [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst recently implementing <a href="http://www.rfc-editor.org/rfc/rfc4871.txt">DKIM</a> and SPF for both my personal domain e-mail and for the corporate mail-servers I am responsible for, I found a great verification e-mail box from the DKIM mailing list.</p>
<p>If, after setting up your new extensions to the SMTP protocol, you wish to verify everything is working correctly then I thoroughly recommend a blank e-mail to this address: <a href="mailto:check-auth@verifier.port25.com">check-auth@verifier.port25.com</a></p>
<p>Let&#8217;s run through the results of this e-mail for my domain, cjbuckley.net:</p>
<pre> <u>Summary of Results</u>
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         pass
Sender-ID check:    pass</pre>
<p>Immediately, we can see that the implementations have been successful &#8211; this is a good sign!</p>
<pre><u>SPF check details</u>
Result:         pass
ID(s) verified: smtp.mail=example@cjbuckley.net
DNS record(s):
cjbuckley.net. 300 IN TXT "v=spf1 redirect=_spf.cjbuckley.net"
_spf.cjbuckley.net. 300 IN TXT "v=spf1 ip4:87.127.106.176/29 ip4:84.45.189.64/29 include:ukfsn.org -all"
</pre>
<p>The detail outputted from this SPF check is impressive; as we can see, my domain initially does a redirect to _spf.cjbuckley.net (note the underscore &#8211; these _are_ valid in TXT records).  This allows many domains I am the hostmaster for (corporate ones, usually) to be easily managed.</p>
<p>For example, I use redirect: _spf.mycorporatedomain.com  for all my corporate domains, this cleans up the SPF records and allows easy management of the record database &#8211; all other domains can be redirected to _spf.mycorporatedomain.com.  It works very well, and is something I noticed Google taking advantage of, initially.. :-)</p>
<p>Next up &#8211; DomainKeys:</p>
<pre><u>DomainKeys check details:</u>
Result:         neutral (message not signed)
ID(s) verified: header.From=example@cjbuckley.net
DNS record(s):
</pre>
<p>The checker confirms that I do not have DK implemented &#8211; indeed, this is correct.  DKIM replaces DK, and is now being driven forward to replace Yahoo! DomainKey&#8217;s.  Note: gmail.com only verifies DK signatures, not DKIM yet &#8211; a bit disappointing, though they _do_ sign both with DKIM and DK.</p>
<pre> <u>DKIM check details:</u>
Result:         pass
ID(s) verified: header.From=example@cjbuckley.net
DNS record(s):
beta._domainkey.cjbuckley.net. 300 IN TXT "k=rsa; t=y;p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDiIfv9vqSRUo9L8
ztX/C4gfCD/Ivt8eAGyQbjJ2g4Rq764NPwauj5/sY2AfMrFPqhA0ieXWtmJy2gFS
c4ZlxT8KYaFsJATOpJfYAXUtzmmQ8+RcioyeN3LjzNhm1gUYyJI1Lw0yD2y+k
dN3YxY4NZ0esMXrKbsngTl3pNcNCNxXwIDAQAB"
</pre>
<p>We can see that our DKIM policy has been verified successfully.  As dkim.org states:</p>
<blockquote><p>
DKIM lets an organization take responsibility for a message.  The organization taking responsibility is a handler of the message, either as its originator or as an intermediary. Their reputation is the basis for evaluating whether to trust the message for delivery.
</p></blockquote>
<p>Given this statement, e-commerce, financial and banking organisations should have either implemented or be on their way to planning an implementation of DKIM.  Personally, I find SPF flawed &#8211; DKIM is the wiser choice.  </p>
<p>I&#8217;m hoping to blog a <a href="http://www.jason.long.name/dkimproxy/">dkimproxy</a> implementation guide shortly, as the published guide has a few advisories I have issue with and would like clarified.</p>
<p>Comments, welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cjbuckley.net/blog/2007/07/10/dkim-domain-keys-and-spf-verification/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
