<?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>dkim Архиви - rosen4o.net</title>
	<atom:link href="https://rosen4o.net/tag/dkim/feed/" rel="self" type="application/rss+xml" />
	<link>https://rosen4o.net/tag/dkim/</link>
	<description></description>
	<lastBuildDate>Thu, 10 Apr 2014 14:57:19 +0000</lastBuildDate>
	<language>bg-BG</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>dkim on debian with postfix</title>
		<link>https://rosen4o.net/2014/04/10/dkim-on-debian-with-postfix/</link>
					<comments>https://rosen4o.net/2014/04/10/dkim-on-debian-with-postfix/#respond</comments>
		
		<dc:creator><![CDATA[rosen4o]]></dc:creator>
		<pubDate>Thu, 10 Apr 2014 14:57:19 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[dkim]]></category>
		<category><![CDATA[postfix]]></category>
		<guid isPermaLink="false">http://rosen4o.net/?p=1000</guid>

					<description><![CDATA[<p>This is a guide to installing OpenDKIM for multiple domains on a Postfix-installtion on Debian. I tried some other guides but kept running into problems, so this is how I did it. Among others, Google Gmail and Yahoo mail check<span class="ellipsis">&#8230;</span></p>
<div class="read-more"><a href="https://rosen4o.net/2014/04/10/dkim-on-debian-with-postfix/">Прочетете повече ›</a></div>
<p><!-- end of .read-more --></p>
<p>Материалът <a href="https://rosen4o.net/2014/04/10/dkim-on-debian-with-postfix/">dkim on debian with postfix</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This is a guide to installing OpenDKIM for multiple domains on a Postfix-installtion on Debian. I tried some other guides but kept running into problems, so this is how I did it.</p>
<p>Among others, Google Gmail and Yahoo mail check your email for a DKIM signature.<br />
Install and Configure OpenDKIM</p>
<p>1. Install OpenDKIM</p>
<blockquote><p><strong>apt-get install opendkim</strong></p></blockquote>
<p>Comment: This will install the latest available stable Debian packaged version of OpenDKIM which is currently 2.0.1. This version is already a couple of years old (2010).<br />
If you know how/want to compile sources yourself, then the latest version is 2.4.3 (and 2.5.0 is right around the corner)</p>
<p>2. Edit the OpenDKIM config file</p>
<blockquote><p><strong>vim /etc/opendkim.conf</strong></p></blockquote>
<p>Add these rows:</p>
<blockquote><p><strong>KeyTable /etc/opendkim/KeyTable</strong><br />
<strong> SigningTable /etc/opendkim/SigningTable</strong><br />
<strong> ExternalIgnoreList /etc/opendkim/TrustedHosts</strong><br />
<strong> InternalHosts /etc/opendkim/TrustedHosts</strong></p></blockquote>
<p>Note: If you run multiple instances of Postfix you need to add this to the opendkim.conf for each instance (or the ones you want to use opendkim)</p>
<p>3. Edit /etc/opendkim/TrustedHosts</p>
<blockquote><p><strong>mkdir -p <strong>/etc/opendkim/</strong></strong><br />
<strong>vim /etc/opendkim/TrustedHosts</strong></p></blockquote>
<p>Add domains, hostnames and/or ip’s that should be handled by OpenDKIM. Don’t forget localhost.</p>
<blockquote><p><strong>127.0.0.1</strong><br />
<strong> localhost</strong></p></blockquote>
<p>4. Edit /etc/default/opendkim</p>
<blockquote><p><strong>vim /etc/default/opendkim</strong></p></blockquote>
<p>Uncomment this row:</p>
<blockquote><p><strong>SOCKET=&#8220;inet:12345@localhost&#8220; # listen on loopback on port 12345</strong></p></blockquote>
<p>Generate keys<br />
Repeat these steps to generate keys for each domain you will send email from. Replace mydomain.com with your domain name in examples below.</p>
<p>1. Generate key</p>
<blockquote><p><strong>mkdir -p /etc/opendkim/keys/mydomain.com</strong><br />
<strong> cd /etc/opendkim/keys/mydomain.com</strong><br />
<strong> opendkim-genkey -r -d mydomain.com</strong><br />
<strong> chown opendkim:opendkim default.private</strong></p></blockquote>
<p>2. Add domain to KeyTable /etc/opendkim/KeyTable</p>
<blockquote><p><strong>vim /etc/opendkim/KeyTable</strong></p></blockquote>
<p>Add line</p>
<blockquote><p><strong>default._domainkey.mydomain.com mydomain.com:default:/etc/opendkim/keys/mydomain.com/default.private</strong></p></blockquote>
<p>3. Add domain to SigningTable /etc/opendkim/SigningTable</p>
<blockquote><p><strong>vim /etc/opendkim/SigningTable</strong></p></blockquote>
<p>Add line:</p>
<blockquote><p><strong>mydomain.com default._domainkey.mydomain.com</strong></p></blockquote>
<p>Note that in OpenDKIM 2.0.1 domain names are case sensitive (supposed to be fixed from 2.3.1 but I have not tested).<br />
This means that in the above example an email from info@mydomain.com will be signed, but an email from info@MyDomain.com will not be signed. The workaround is to add one extra entry for MyDomain.com to SigningTable.</p>
<p>4. Add to DKIM public key to DNS</p>
<p>Add an entry for the public key to the DNS server you are using for your domain. You find the public key here:</p>
<blockquote><p><strong>cat /etc/opendkim/keys/mydomain.com/default.txt</strong></p></blockquote>
<p>And insert it in your zone file<br />
Start OpenDKIM</p>
<blockquote><p><strong>/etc/init.d/opendkim start</strong></p></blockquote>
<p>In the future, if you make any changes to configuration remember to restart: /etc/init.d/opendkim restart<br />
Configure and Restart Postifx</p>
<p>1. Configure Postfix</p>
<blockquote><p><strong>vim /etc/postfix/main.cf</strong></p></blockquote>
<p>Add or edit these lines:</p>
<blockquote><p><strong>milter_default_action = accept</strong><br />
<strong> milter_protocol = 6</strong><br />
<strong> smtpd_milters = inet:localhost:12345</strong><br />
<strong> non_smtpd_milters = inet:localhost:12345</strong></p></blockquote>
<p>2. Restart Postfix</p>
<blockquote><p><strong>/etc/init.d/postfix reload</strong></p></blockquote>
<p>Log files are in the /var/log directory</p>
<blockquote><p><strong>cat /var/log/mail.log</strong><br />
<strong></strong><strong>cat /var/log/mail.warn</strong><br />
<strong> cat /var/log/mail.err</strong></p></blockquote>
<p>Log more info</p>
<blockquote><p><strong>vim /etc/opendkim.conf</strong></p></blockquote>
<p>Add this line:</p>
<blockquote><p><strong>LogWhy yes</strong></p></blockquote>
<p>&nbsp;</p>
<p>Credits</p>
<p>Guides that have helped me along the way: <a href="http://www.debiantutorials.com/setup-domainkeys-identified-mail-dkim-in-postfix/">Debian Tutorials</a> and <a href="http://syslog.tv/2010/01/11/dkim-on-debian-with-postfix/">Syslog</a></p>
<p>Материалът <a href="https://rosen4o.net/2014/04/10/dkim-on-debian-with-postfix/">dkim on debian with postfix</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rosen4o.net/2014/04/10/dkim-on-debian-with-postfix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
