<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[iRedMail — DKIM signing for multiple virtual domains?]]></title>
	<link rel="self" href="http://www.iredmail.org/forum/feed-atom-topic130.xml" />
	<updated>2009-07-18T03:38:34Z</updated>
	<generator>PunBB</generator>
	<id>http://www.iredmail.org/forum/topic130-dkim-signing-for-multiple-virtual-domains.html</id>
		<entry>
			<title type="html"><![CDATA[Re: DKIM signing for multiple virtual domains?]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post691.html#p691" />
			<content type="html"><![CDATA[<p>hmm, Why not just give it a try?</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-07-18T03:38:34Z</updated>
			<id>http://www.iredmail.org/forum/post691.html#p691</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DKIM signing for multiple virtual domains?]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post688.html#p688" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code># setfacl -m u:amavis:r-- mydefaultdomain.net.pem</code></pre></div><p>Sweet, that worked great.</p><div class="quotebox"><blockquote><p>Just make sure you have one &#039;dkim_key()&#039;, and it will use it as default DKIM pem.</p></blockquote></div><p>So was I right about the following code?</p><div class="codebox"><pre><code>&#039;dkim_key(&quot;.&quot;, &quot;dkim&quot;, &quot;/var/lib/dkim/mydefaultdomain.net.pem&quot;);&#039;</code></pre></div><p>As long as I replace a specific signing domain with &quot;.&quot; it will sign all emails from all domains?</p><p>Thanks again for all your help.</p>]]></content>
			<author>
				<name><![CDATA[Steve]]></name>
				<uri>http://www.iredmail.org/forum/user102.html</uri>
			</author>
			<updated>2009-07-17T18:32:04Z</updated>
			<id>http://www.iredmail.org/forum/post688.html#p688</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DKIM signing for multiple virtual domains?]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post682.html#p682" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Steve wrote:</cite><blockquote><p>&#039;-rw-r-----+&nbsp; 1 root&nbsp; &nbsp;root&nbsp; &nbsp; 887 Jul 14 16:43 mydefaultdomain.net.pem&#039;</p></blockquote></div><p>Please use &#039;getfacl&#039; command to check advance access control:<br /></p><div class="codebox"><pre><code># getfacl mydefaultdomain.net.pem</code></pre></div><div class="quotebox"><blockquote><p>So I am looking for THE magic chmod command to fix permissions for any sites I add and still have a secure file.</p></blockquote></div><p>For security reason, it&#039;s not a good idea to make it world-readable, so we restrict it like this:<br /></p><div class="codebox"><pre><code># setfacl -m u:amavis:r-- mydefaultdomain.net.pem</code></pre></div><p>You can search &#039;setfacl&#039; in iRedMail-x.y.z/functions/amavisd.sh.</p><div class="quotebox"><blockquote><p>In regards to the catchall signing of every outgoing email by default I assume you are referring the last line in the &#039;/etc/amavisd.conf&#039; file that says the following?</p><p>&#039;&nbsp; &nbsp; # catchall defaults<br />&nbsp; &nbsp; &#039;.&#039; =&gt; { a =&gt; &#039;rsa-sha256&#039;, c =&gt; &#039;relaxed/simple&#039;, ttl =&gt; 30*24*3600 },&#039;</p><p>This line doesn&#039;t seem to be pointing to a key file like the &#039;dkim_key&#039; line does. So would I still need to add a line similar to the following?</p><p>&#039;dkim_key(&quot;.&quot;, &quot;dkim&quot;, &quot;/var/lib/dkim/mydefaultdomain.net.pem&quot;);&#039;</p><p>Then comment out the one that was created by the install script?</p><p>&#039;dkim_key(&quot;mydefaultdomain.net&quot;, &quot;dkim&quot;, &quot;/var/lib/dkim/mydefaultdomain.net.pem&quot;);&#039;</p><p>Thank you for you assistance with these issues.</p></blockquote></div><p>Just make sure you have one &#039;dkim_key()&#039;, and it will use it as default DKIM pem.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-07-17T07:08:07Z</updated>
			<id>http://www.iredmail.org/forum/post682.html#p682</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DKIM signing for multiple virtual domains?]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post676.html#p676" />
			<content type="html"><![CDATA[<p>Ok, I got everything to work after adding separate &#039;dkim_key&#039; lines to the &#039;/etc/amavisd.conf&#039; file and creating my own keys by running the following command:</p><p>&#039;amavisd genrsa /var/lib/dkim/mydomain1.com.pem&#039;</p><p>I had issues with the default permissions though.</p><p>This first site is the default site that the install script asked for when setting up this box initially. I can&#039;t seem to find any documentation on how to duplicate these permission. The plus sign throws me off here.</p><p>&#039;-rw-r-----+&nbsp; 1 root&nbsp; &nbsp;root&nbsp; &nbsp; 887 Jul 14 16:43 mydefaultdomain.net.pem&#039;</p><p>When I run the &#039;amavisd genrsa&#039; command I get the following permission set and when I add the appropriate lines in the &#039;/etc/amavisd.conf&#039; file and restart the amavisd service, it will not come back up complaining about permissions.</p><p>&#039;-rw-------&nbsp; &nbsp;1 root&nbsp; &nbsp;root&nbsp; &nbsp; 891 Jul 16 00:56 mydomain1.com.pem&#039;</p><p>A third site I have set up on the system works after doing a:</p><p>&#039;chmod 777 mydomain2.com.pem&#039; </p><p>resulting in the following:</p><p>&#039;-rwxrwxrwx&nbsp; &nbsp;1 root&nbsp; &nbsp;root&nbsp; &nbsp; 887 Jul 15 15:06 mydomain2.com.pem&#039;</p><p>So I am looking for THE magic chmod command to fix permissions for any sites I add and still have a secure file.</p><br /><p>In regards to the catchall signing of every outgoing email by default I assume you are referring the last line in the &#039;/etc/amavisd.conf&#039; file that says the following?</p><p>&#039;&nbsp; &nbsp; # catchall defaults<br />&nbsp; &nbsp; &#039;.&#039; =&gt; { a =&gt; &#039;rsa-sha256&#039;, c =&gt; &#039;relaxed/simple&#039;, ttl =&gt; 30*24*3600 },&#039;</p><p>This line doesn&#039;t seem to be pointing to a key file like the &#039;dkim_key&#039; line does. So would I still need to add a line similar to the following?</p><p>&#039;dkim_key(&quot;.&quot;, &quot;dkim&quot;, &quot;/var/lib/dkim/mydefaultdomain.net.pem&quot;);&#039;</p><p>Then comment out the one that was created by the install script?</p><p>&#039;dkim_key(&quot;mydefaultdomain.net&quot;, &quot;dkim&quot;, &quot;/var/lib/dkim/mydefaultdomain.net.pem&quot;);&#039;</p><p>Thank you for you assistance with these issues.</p>]]></content>
			<author>
				<name><![CDATA[Steve]]></name>
				<uri>http://www.iredmail.org/forum/user102.html</uri>
			</author>
			<updated>2009-07-16T15:20:33Z</updated>
			<id>http://www.iredmail.org/forum/post676.html#p676</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DKIM signing for multiple virtual domains?]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post669.html#p669" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Steve wrote:</cite><blockquote><p>DKIM signing works great for my default domain. I&#039;m sure I&#039;ve missed something but what is the &quot;correct&quot; way of signing emails from multiple virtual domains?</p></blockquote></div><p>You can use a catchall or a per-domain signing, both are &#039;correct&#039;.</p><div class="quotebox"><blockquote><p>So far it doesn&#039;t seem obvious how to do this. The two parts to the equation that I can see so far are that I need new key files in /var/lib/dkim/ and the /etc/amavisd.conf file needs to be modified.</p></blockquote></div><p>It uses catchall signing by default, and you must add all your domains in &#039;local_domains_maps&#039; (/etc/amavisd.conf).</p><div class="quotebox"><blockquote><p>Is there a simple command that I can run to add other keys and that adds the new config lines to the appropriate files?</p></blockquote></div><p>No.</p>]]></content>
			<author>
				<name><![CDATA[ZhangHuangbin]]></name>
				<uri>http://www.iredmail.org/forum/user2.html</uri>
			</author>
			<updated>2009-07-16T02:07:30Z</updated>
			<id>http://www.iredmail.org/forum/post669.html#p669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[DKIM signing for multiple virtual domains?]]></title>
			<link rel="alternate" href="http://www.iredmail.org/forum/post664.html#p664" />
			<content type="html"><![CDATA[<p>DKIM signing works great for my default domain. I&#039;m sure I&#039;ve missed something but what is the &quot;correct&quot; way of signing emails from multiple virtual domains? It appears I can use the same key or use a catchall in the amavisd.conf file to sign ALL outgoing emails. But what are the best practices for DKIM signing in this situation? </p><p>So far it doesn&#039;t seem obvious how to do this. The two parts to the equation that I can see so far are that I need new key files in /var/lib/dkim/ and the /etc/amavisd.conf file needs to be modified. Is there a simple command that I can run to add other keys and that adds the new config lines to the appropriate files? </p><p>Or was there a different way to set up the box initially that would have done all this for me for multiple domains?</p>]]></content>
			<author>
				<name><![CDATA[Steve]]></name>
				<uri>http://www.iredmail.org/forum/user102.html</uri>
			</author>
			<updated>2009-07-15T17:12:17Z</updated>
			<id>http://www.iredmail.org/forum/post664.html#p664</id>
		</entry>
</feed>
