Anonymous
×
Create a new article
Write your page title here:
We currently have 27 articles on PhenixOps. Type your article name above or click on one of the titles below and start writing!



PhenixOps
27Articles

OpenDkim: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
To setup open dkim a couple of steps have to be made to install and configure the service and get it running. The example domain is noordwijk.nl, change it to yours.
To setup open dkim a couple of steps have to be made to install and configure the service and get it running. The example domain is noordwijk.nl, change it to yours.<br>
---
 
<code>
mkdir /etc/dkimkeys
mkdir /etc/dkimkeys
chown opendkim.opendkim /etc/dkimkeys
chown opendkim.opendkim /etc/dkimkeys
 
</code>
 
<br>
<code>
<code>
sudo -u opendkim opendkim-genkey -D /etc/dkimkeys -d noordwijk.nl -s 2020
sudo -u opendkim opendkim-genkey -D /etc/dkimkeys -d noordwijk.nl -s 2020
Line 12: Line 13:
KeyFile                /etc/dkimkeys/2020.private
KeyFile                /etc/dkimkeys/2020.private
Socket                  inet:8891@localhost
Socket                  inet:8891@localhost
 
</code>
<code>
<br>
Make a backup of the original config
<br>
<code>
cp -rp /etc/postfix/main.cf /etc/postfix/main.cf_bak
cp -rp /etc/postfix/main.cf /etc/postfix/main.cf_bak
 
</code>
<br>
Add the new config parts
<code>
vi /etc/postfix/main.cf
vi /etc/postfix/main.cf
smtpd_milters = inet:localhost:8891
smtpd_milters = inet:localhost:8891
non_smtpd_milters = $smtpd_milters
non_smtpd_milters = $smtpd_milters
</code>


<code>
systemctl restart opendkim
systemctl restart opendkim
systemctl restart postfix
</code>
</code>



Revision as of 13:51, 16 April 2020

To setup open dkim a couple of steps have to be made to install and configure the service and get it running. The example domain is noordwijk.nl, change it to yours.

mkdir /etc/dkimkeys chown opendkim.opendkim /etc/dkimkeys
sudo -u opendkim opendkim-genkey -D /etc/dkimkeys -d noordwijk.nl -s 2020

Domain noordwijk.nl Selector 2020 KeyFile /etc/dkimkeys/2020.private Socket inet:8891@localhost
Make a backup of the original config
cp -rp /etc/postfix/main.cf /etc/postfix/main.cf_bak
Add the new config parts vi /etc/postfix/main.cf smtpd_milters = inet:localhost:8891 non_smtpd_milters = $smtpd_milters

systemctl restart opendkim systemctl restart postfix

Following text record needs to go into the DNS Zonefile

user@host:~# cat /etc/dkimkeys/2020.txt

2020._domainkey IN TXT ( "v=DKIM1; k=rsa; "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqcS4IGfYnGeToHq7lziTCithEA5esxonnQjtp8hbVSGNDXeAAXQvdzg34QkpS/GCtsRa28XmnTw451dUDei/IE3CUrVet4SaYurERKzpwoBHyAMGCQgqgUzhGXpAOcL50XHXTtjZ9h1rdwyfTlg9YNosXrEXyF7Rt5YJOa/n3UQIDAQAB" )  ; ----- DKIM key 2020 for noordwijk.nl