<?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/"
	xmlns:media="http://search.yahoo.com/mrss/" >

<channel>
	<title>dkim &#8211; Random thoughts</title>
	<atom:link href="https://random.sphere.ro/tag/dkim/feed/" rel="self" type="application/rss+xml" />
	<link>https://random.sphere.ro</link>
	<description>for when you get older and memory does&#039;t help you further</description>
	<lastBuildDate>Thu, 17 Sep 2020 12:32:31 +0000</lastBuildDate>
	<language>en-AU</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
	<item>
		<title>qmail to exim migration (thoughts and not commands)</title>
		<link>https://random.sphere.ro/qmail-to-exim-migration-thoughts-and-not-commands/</link>
					<comments>https://random.sphere.ro/qmail-to-exim-migration-thoughts-and-not-commands/#comments</comments>
		
		<dc:creator><![CDATA[iulian]]></dc:creator>
		<pubDate>Wed, 19 Aug 2020 13:33:59 +0000</pubDate>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[AllowSupplementaryGroups]]></category>
		<category><![CDATA[clamav]]></category>
		<category><![CDATA[clamav-unofficial-sigs]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[exim4u]]></category>
		<category><![CDATA[fehQlibs]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[qmail-scanner]]></category>
		<category><![CDATA[qmail-spp]]></category>
		<category><![CDATA[roundcubemail]]></category>
		<category><![CDATA[s/qmail]]></category>
		<category><![CDATA[simscan]]></category>
		<category><![CDATA[spamassassin]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[ucspi-ssl]]></category>
		<category><![CDATA[ucspi-tcp6]]></category>
		<category><![CDATA[vpopmail]]></category>
		<guid isPermaLink="false">https://random.sphere.ro/?p=117</guid>

					<description><![CDATA[<p>I&#8217;ve using Qmail since 2013 and it was a great companion. I&#8217;ve added so many custom scripts in it(or in this ecosystem) that it will take me days just to write about it. Unfortunately for some time already I&#8217;ve started to feel the end is near for Qmail.  Here is way(just few of them): A&#8230;</p>
<p class="read-more"><a class="readmore-btn" href="https://random.sphere.ro/qmail-to-exim-migration-thoughts-and-not-commands/">Read More<span class="screen-reader-text">  Read More</span></a></p>
<p>The post <a rel="nofollow" href="https://random.sphere.ro/qmail-to-exim-migration-thoughts-and-not-commands/">qmail to exim migration (thoughts and not commands)</a> appeared first on <a rel="nofollow" href="https://random.sphere.ro">Random thoughts</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>I&#8217;ve using Qmail since 2013 and it was a great companion. I&#8217;ve added so many custom scripts in it(or in this ecosystem) that it will take me days just to write about it.<br />
Unfortunately for some time already I&#8217;ve started to feel the end is near for Qmail.  Here is way(just few of them):</p>
<ul>
<li>A lot of packages are not maintained or things are maintained by different group of people who don&#8217;t use the same patches as you.</li>
<li>It&#8217;s becoming really hard to keep track when you install a new server which patch to apply and at which step(for example i used tap patch but this is rarely used).</li>
<li>Often you need to understand and adapt the patches to your situation because some might include(partially or fully) other patches that you need also to apply. Basically in the end you start to write your own set of patches which obviously contains pieces of code from there of there. If you forgot something it might break or not work as intended.</li>
<li>Quite often as well you need support for new technologies and there fewer and fewer people who want to support this.<br />
For example: if you want ipv6 there is a way <a href="https://www.fehcom.de/ipnet/djbware.html" target="_blank" rel="noopener">via fehQlibs, ucspi-tcp6 and ucspi-ssl </a>but there is no clear indication this will work as intended from the beginning with your own version(i mean your own set of patches) since the owner has his own Qmail version named <a href="https://www.fehcom.de/sqmail/sqmail.html" target="_blank" rel="noopener">s/qmail.</a></li>
<li>After a long ride with qmail-scanner i went to simscan. This one can support only spamassassin and clamav.(or you start coding at it as well). For most of you it will be enough but if you want better antivirus(yes, commercial) than you&#8217;re out of luck. Yes, <a href="https://github.com/extremeshok/clamav-unofficial-sigs" target="_blank" rel="noopener">clamav-unofficial-sigs</a> might give you  a great boost but it might not be sufficient if your client wants the best.</li>
</ul>
<p>&nbsp;</p>
<p>Why Exim ?</p>
<p>Simply because is highly configurable, is popular and you find tons of information. This flexibility might come <a href="https://blog.rapid7.com/2019/09/10/cve-2019-15846-privileged-remote-code-execution-vulnerability-in-the-exim-mailer-what-you-need-to-know/" target="_blank" rel="noopener">with a price</a> but at least those are &#8220;hopefully&#8221; treated fast.<br />
For example i really liked qmail-spp patch and i heavily used(unfortunately this patch is again not included to a lot of different qmail projects available on the market) with a lot of perl scripts and the same principals can be used in exim acl which is great.</p>
<p>Learning curve to exim might be hard. Because of that I&#8217;ve encourage you to use in the beginning and old but good ecosystem named <a href="https://exim4u.org/" target="_blank" rel="noopener">exim4u</a>.<br />
You will definitely need to add/modify ACL protections, to change the behavior of the DKIM for forwarded messages(because the default exim4u install want to sign also the forwarded messages which is wrong) and things that you will &#8220;learn by doing it&#8221;. Again, it&#8217;s far from perfect but it&#8217;s a great start and i recommend it.</p>
<p>Things not to miss on your migration:</p>
<p>&#8211; Compile exim with the support for maildir. In this way you can keep the same structure that you had with vpopmail.(keep in mind that exim4u for you use Maildir instead of .maildir directory so you need to tune a little bit the php files if you use the GUI to create domains/emails/etc.)<br />
&#8211; Migrate the users from vpopmail database to exim4u database &#8211; i suggest to make your own scripts to do this. Doing it manually it&#8217;s taking too much time.<br />
&#8211; Don&#8217;t forget about greylist db ; exim4u use sqlite3 in /var/spool/exim/db/greylist.db. You need to create the file and the tables.<br />
&#8211; Don&#8217;t forget to change in dovecot(or the IMAP app used) to use the new database<br />
&#8211; If you are using an webmail adapt it and his plugins(for example: if you are using <a href="https://roundcube.net/" target="_blank" rel="noopener">Roundcubemail</a> with password plugin you need to change to reflect the new sql/db)<br />
&#8211; If older clamav version is used you might need to use AllowSupplementaryGroups but this should not be case for version above 0.100.(they just announced version 0.103 RC)<br />
&#8211; migrate the TLS (server.cert, server.pem)<br />
&#8211; migrate the DKIM certifications<br />
&#8211; as I&#8217;ve already mentioned several times above, exim4u is far from perfect but from my point of view it has a really nasty bug IF you are (still ???) using not encrypted passwords. Please check how <em>eq</em> and <em>crypteq </em>are used in server_condition. <a href="https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_plaintext_authenticator.html" target="_blank" rel="noopener">More info on the exim manual</a>.</p>
<p>The post <a rel="nofollow" href="https://random.sphere.ro/qmail-to-exim-migration-thoughts-and-not-commands/">qmail to exim migration (thoughts and not commands)</a> appeared first on <a rel="nofollow" href="https://random.sphere.ro">Random thoughts</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://random.sphere.ro/qmail-to-exim-migration-thoughts-and-not-commands/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>DMARC / Spamassassin / Qmail</title>
		<link>https://random.sphere.ro/dmarc-on-spamassassin/</link>
					<comments>https://random.sphere.ro/dmarc-on-spamassassin/#comments</comments>
		
		<dc:creator><![CDATA[iulian]]></dc:creator>
		<pubDate>Mon, 12 Aug 2019 09:10:03 +0000</pubDate>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[dmarc]]></category>
		<category><![CDATA[gentoo]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[qpsmtpd]]></category>
		<category><![CDATA[spamassassin]]></category>
		<category><![CDATA[spf]]></category>
		<guid isPermaLink="false">https://random.sphere.ro/?p=93</guid>

					<description><![CDATA[<p>There are a lot of articles regarding DMARC so i will not start again about what it is and what is useful for. Also i will not talk about the drawbacks when it&#8217;s implemented. I will instead give you a hint about where to generate a DMARC policy  and where to verify it. Until you&#8230;</p>
<p class="read-more"><a class="readmore-btn" href="https://random.sphere.ro/dmarc-on-spamassassin/">Read More<span class="screen-reader-text">  Read More</span></a></p>
<p>The post <a rel="nofollow" href="https://random.sphere.ro/dmarc-on-spamassassin/">DMARC / Spamassassin / Qmail</a> appeared first on <a rel="nofollow" href="https://random.sphere.ro">Random thoughts</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>There are a lot of articles regarding DMARC so i will not start again about what it is and what is useful for. Also i will not talk about the drawbacks when it&#8217;s implemented. I will instead give you a hint about where to <a href="https://mxtoolbox.com/DMARCRecordGenerator.aspx" target="_blank" rel="noopener">generate a DMARC</a> policy  and <a href="https://mxtoolbox.com/dmarc.aspx" target="_blank" rel="noopener">where to verify it</a>.</p>
<p>Until you understand the essence please also be very conservative about the policies that you apply. The example of deployment<a href="https://support.google.com/a/answer/2466563?hl=en" target="_blank" rel="noopener"> found it on google</a> it provides the way you should do it as well. More exactly:</p>
<ol>
<li>p=none pct=100</li>
<li>p=quarantine pct=1</li>
<li>p=quarantine pct=5</li>
<li>p=quarantine pct=10</li>
<li>p=quarantine pct=25</li>
<li>p=quarantine pct=50</li>
<li>p=quarantine pct=100</li>
<li>p=reject pct=1</li>
<li>p=reject pct=5</li>
<li>p=reject pct=10</li>
<li>p=reject pct=25</li>
<li>p=reject pct=50</li>
<li>p=reject pct=100</li>
</ol>
<p>Now that you already implemented it you might receive reports(if you provided rua/ruf) about what is happening with your domains.</p>
<p>But what about implementing DMARC in your MTA? Usually the straight answer will be opendmarc but depending your MTA the installation will not be very  easy. Since here we will talk about Qmail the solutions found by me in this moment are:</p>
<p>1) <a href="https://en.wikipedia.org/wiki/Qpsmtpd" target="_blank" rel="noopener">Qpsmtpd</a> and opendmarc. Please <a href="https://github.com/msimerson/mail-dmarc/wiki" target="_blank" rel="noopener">also see.</a></p>
<p>2)<a href="https://metacpan.org/pod/Mail::AuthenticationResults::SpamAssassin" target="_blank" rel="noopener"> A perl plugin</a> written for spam-assassin.</p>
<p>3) Using AskDNS plugin already available in spamassasin like this:</p>
<pre>ifplugin Mail::SpamAssassin::Plugin::AskDNS
askdns __DMARC_POLICY_NONE _dmarc._AUTHORDOMAIN_ TXT /^v=DMARC1;.*\bp=none;/
askdns __DMARC_POLICY_QUAR _dmarc._AUTHORDOMAIN_ TXT /^v=DMARC1;.*\bp=quarantine;/
askdns __DMARC_POLICY_REJECT _dmarc._AUTHORDOMAIN_ TXT /^v=DMARC1;.*\bp=reject;/

meta DMARC_REJECT !(DKIM_VALID_AU || SPF_PASS) &amp;&amp; __DMARC_POLICY_REJECT
score DMARC_REJECT 10
meta DMARC_QUAR !(DKIM_VALID_AU || SPF_PASS) &amp;&amp; __DMARC_POLICY_QUAR
score DMARC_QUAR 5
meta DMARC_NONE !(DKIM_VALID_AU || SPF_PASS) &amp;&amp; __DMARC_POLICY_NONE
score DMARC_NONE 0.1
endif</pre>
<p>Obviously edit the scores according to you needs.</p>
<p>4) After this article was written I&#8217;ve found out from <a href="https://notes.sagredo.eu/en/qmail-notes-185/configuring-dkim-for-qmail-92.html#comment1379" target="_blank" rel="noopener">here</a> (btw great blog about qmail)  there is another tool to use it. You can find it <a href="https://github.com/fany/App-Qmail-DMARC" target="_blank" rel="noopener">here.</a></p>
<p>So, what was your solution for Qmail and DMARC ? What do you use ? How do you use it ?</p>
<p>&nbsp;</p>
<p>Later edit(17/09/2020): A plugin for spamassassin was created. This is maintained and i believe it will introduced in core in the next releases. You can find references <a href="https://github.com/bigio/spamassassin-dmarc" target="_blank" rel="noopener">here</a> and <a href="https://cwiki.apache.org/confluence/display/SPAMASSASSIN/CustomPlugins" target="_blank" rel="noopener">here.</a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="https://random.sphere.ro/dmarc-on-spamassassin/">DMARC / Spamassassin / Qmail</a> appeared first on <a rel="nofollow" href="https://random.sphere.ro">Random thoughts</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://random.sphere.ro/dmarc-on-spamassassin/feed/</wfw:commentRss>
			<slash:comments>8</slash:comments>
		
		
			</item>
	</channel>
</rss>
