[BlueOnyx:25555] Re: DKIM

Michael Stauber mstauber at blueonyx.it
Fri Jul 29 14:26:40 -05 2022


Hi Adam,

> Could you please tell me how to edit the opendkim.conf (shown below) as well as any additional steps, as I'm afraid if I try it myself something will really go wrong. And I feel the entire group should have this documentation available.
> 
> I've looked at https://www.vttoth.com/CMS/technical-notes/356-setting-up-dkim-with-sendmail and https://www.agari.com/email-security-blog/dkim-setup/


I only set up DKIM once (on the very server that this list runs on) and 
haven't touched that in years. So I don't know what guide I was 
following, but I recall that /etc/opendkim.conf needed almost no 
changes. Here is mine:

#> cat /etc/opendkim.conf | grep -Ev "^#|^$"
PidFile /var/run/opendkim/opendkim.pid
Mode    s
Syslog  yes
SyslogSuccess   yes
LogWhy  yes
UserID  opendkim:opendkim
Socket  inet:8891 at 127.0.0.1
Umask   002
SendReports     yes
SoftwareHeader  yes
Canonicalization        relaxed/relaxed
Domain  lists.blueonyx.it
Selector        default
MinimumKeyBits  1024
KeyFile /etc/opendkim/keys/default.private
KeyTable        /etc/opendkim/KeyTable
SigningTable    refile:/etc/opendkim/SigningTable
ExternalIgnoreList      refile:/etc/opendkim/TrustedHosts
InternalHosts   refile:/etc/opendkim/TrustedHosts
OversignHeaders From

So it runs on 127.0.0.1 port 8891 and the domain is set to the server 
name: lists.blueonyx.it.

Sendmail's /etc/mail/sendmail.mc just got this addition:

#> cat /etc/mail/sendmail.mc|grep dkim
INPUT_MAIL_FILTER(`opendkim', `S=inet:8891 at 127.0.0.1, T=S:6m;R:6m;E:15m')dnl

If this were a 5210R with Postfix, it would be even simpler. One just 
needed to create the textfile /etc/postfix/milters.d/09-opendkim.cf and 
put this single line in it:

inet:127.0.0.1:8891

After a restart of Postfix it would then be included in the Postfix 
configuration.

> And is there a way the DNS TXT can be generated via the GUI, like with Plesk?

Not automatically. Generate the keys and records by using one of the 
guides on the internet and then just use the GUI to add the records as 
TXT records.

Two examples:

https://mailtrap.io/blog/dkim/
https://mailtrap.io/blog/create-dkim-tutorial/

The second link has a list of web based tools or shell tools and 
instructions on how to do it.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list