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

(Created page with "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 /e...")
 
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.
 
---
mkdir /etc/dkimkeys
mkdir /etc/dkimkeys
chown opendkim.opendkim /etc/dkimkeys
chown opendkim.opendkim /etc/dkimkeys


<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 14: Line 16:


vi /etc/postfix/main.cf
vi /etc/postfix/main.cf
# Things needed in main.cf to run opendkim
smtpd_milters = inet:localhost:8891
smtpd_milters = inet:localhost:8891
non_smtpd_milters = $smtpd_milters
non_smtpd_milters = $smtpd_milters


systemctl restart opendkim
systemctl restart opendkim
</code>


Following text record needs to go into the DNS Zonefile
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; "
<code>user@host:~# cat /etc/dkimkeys/2020.txt</code>
        "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqcS4IGfYnGeToHq7lziTCithEA5esxonnQjtp8hbVSGNDXeAAXQvdzg34QkpS/GCtsRa28XmnTw451dUDei/IE3CUrVet4SaYurERKzpwoBHyAMGCQgqgUzhGXpAOcL50XHXTtjZ9h1rdwyfTlg9YNosXrEXyF7Rt5YJOa/n3UQIDAQAB" )  ; ----- DKIM key 2020 for noordwijk.nl
 
<code>
 
2020._domainkey IN      TXT    ( "v=DKIM1; k=rsa; "p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqcS4IGfYnGeToHq7lziTCithEA5esxonnQjtp8hbVSGNDXeAAXQvdzg34QkpS/GCtsRa28XmnTw451dUDei/IE3CUrVet4SaYurERKzpwoBHyAMGCQgqgUzhGXpAOcL50XHXTtjZ9h1rdwyfTlg9YNosXrEXyF7Rt5YJOa/n3UQIDAQAB" )  ; ----- DKIM key 2020 for noordwijk.nl
</code>

Revision as of 13:47, 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

cp -rp /etc/postfix/main.cf /etc/postfix/main.cf_bak

vi /etc/postfix/main.cf smtpd_milters = inet:localhost:8891 non_smtpd_milters = $smtpd_milters

systemctl restart opendkim

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