Solved Issues with OpenDKIM

This is a little embarrassing even for me. I actually had worked out using OpenDKIM on my FreeBSD 11.2 server but I had a "oh no" with Bind9.. So my assumption is something that I did to fix that had a negative impact. I used https://www.prado.it/2012/04/26/how-to-run-postfix-with-opendkim-on-freebsd-9-0/ as my guide and for a while with some tweaking got it working. Now it won't start and I am getting the follow error

Code:
Starting action milter-opendkim ..
Starting milteropendkim.
opendkim: milter socket must be specified
/usr/local/etc/rc.d/milter-opendkim: WARNING: failed to start milteropendkim

My Opendkim.conf. does specify a filter socket



Code:
AutoRestart             Yes
AutoRestartRate         10/1h
LogWhy                  Yes
Syslog                  Yes
SyslogSuccess           Yes
Mode                    sv
Canonicalization        relaxed/simple
ExternalIgnoreList      refile:/usr/local/etc/opendkim/TrustedHosts
InternalHosts           refile:/usr/local/etc/opendkim/TrustedHosts
KeyTable                refile:/usr/local/etc/opendkim/KeyTable
SigningTable            refile:/usr/local/etc/opendkim/SigningTable
SignatureAlgorithm      rsa-sha256
Socket                  inet:8891@localhost
UMask                   022
UserID                  opendkim:opendkim
TemporaryDirectory      /var/tmp

my appropriate section from main.cf is

Code:
# postfix to use dkim milter
smtpd_milters =  inet:127.0.1.1:8891
non_smtpd_milters =  $stmpd_milters
milter_default_action = accept

and rc.conf section is as follows:

Code:
milteropendkim_enable="YES"
milteropendkim_uid="opendkim"

I know I fixed the once before bunt senility is here
 
darn. stupid typo and small script// color me embarrassed again.. but I am still getting
Code:
Starting action milter-opendkim ..
Starting milteropendkim.
opendkim: milter socket must be specified
/usr/local/etc/rc.d/milter-opendkim: WARNING: failed to start milteropendkim

I eventryied changing the location to
Code:
Socket                  inet:8891@127.0.0.1
 
Have you tried setting milteropendkim_socket in rc.conf instead?
 
That ended the error messages but OpenDKIMis apparently not signing.. which is use to

Code:
DKIM check details:
----------------------------------------------------------
Result:         none (message not signed)
ID(s) verified:

NOTE: DKIM checking has been performed based on the latest DKIM specs
(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for
older versions.  If you are using Port25's PowerMTA, you need to use
version 3.2r11 or later to get a compatible version of DKIM.

Closer. so close
 
I have it working here. My simpler config file below for your reference.

opendkim.conf
Code:
Domain                  xxx.net
KeyFile                 /usr/local/etc/mail/xxx.net.key.pem
Selector                dkim
Socket                  inet:10025@localhost
Syslog                  Yes
Canonicalization        relaxed/simple

postfix/main.cf
Code:
smtpd_milters = inet:127.0.0.1:10025
non_smtpd_milters = $smtpd_milters
milter_default_action = accept

Hope this helps.
 
Played with a command line solution like yours... worked...went further and found that I had an issue with the autostart. It was looking for opendkim.conf. toe be at /usr/local/etc/mail/. mine was at /usr/local/etc/opemdkim/ Move it to expected place and all is working fine.
 
Back
Top