On Wed, 21 Oct 2026, Tom Lane wrote:
Ah-hah, so I'm looking in the wrong place: I should be searching for how to get sendmail to do it (or maybe I need to bite the bullet even harder and switch to postfix). Thanks for the tip!
With sendmail it is not very difficult when using m4
macro processing - just added this file to MTA (not the
submit daemon) configuration:
INPUT_MAIL_FILTER(`opendkim', `S=/var/run/milteropendkim/filter')dnl
$ grep -v -E '^(#|$)' /usr/local/etc/mail/opendkim.conf
Canonicalization relaxed/relaxed
DontSignMailTo <some mailing lists>
InternalHosts /usr/local/etc/mail/InternalHosts
KeyTable /usr/local/etc/mail/KeyTable
LogWhy yes
SigningTable /usr/local/etc/mail/SigningTable
Socket local:/var/run/milteropendkim/filter
Syslog Yes
SyslogSuccess yes
UserID mailnull
/usr/local/etc/mail/SigningTable:
q.saper.info Sep2014._domainkey.saper.info
and some other mappings
/usr/local/etc/mail/KeyTable:
Sep2014._domainkey.saper.info saper.info:Sep2014:/var/db/dkim/Sep2014.private
The only issue was getting the permissions right so that
sendmail does not complain:
# find /var/run/milteropendkim -ls
1576357 8 drwxr-xr-x 2 mailnull wheel
512 Aug 29 14:46 /var/run/milteropendkim
1576227 8 -rw-r--r-- 1 root wheel
4 Aug 29 14:46 /var/run/milteropendkim/pid
1576241 0 srwxr-xr-x 1 mailnull wheel
0 Aug 29 14:46 /var/run/milteropendkim/filter
All of this is using mail/opendkim from FreeBSD ports.
With the amount of processing that needs to be done today during
the input processing while the incoming SMTP connection is active (header
analysis etc.),
before the mail is even accepted I see little advantage
to switch from sendmail to postfix these days.
Marcin
smime.p7s
Description: S/MIME Cryptographic Signature
