Virtualmin: connect to Milter service inet:localhost:8891: Connection refused

Came across this error on Debian 9 and Virtualmin. When setting up DKIM for email delivery it seems like it cant connect to the milter. Error logs were showing

warning: connect to Milter service inet:localhost:8891: Connection refused

Also running

netstat -natpu | grep opendkim 

showed nothing.

A couple steps to fix,

  1. Go into Virtualmin > Email Settings > DomainKeys Identified Mail
  2. Disable DKIM
  3. apt-get purge opendkim opendkim-tools
  4. Re install from Virtualmin > Email Settings > DomainKeys Identified Mail
  5. In /etc/opendkim.conf find the following 2 lines
#Socket                  inet:8892@localhost
Socket local:/var/run/opendkim/opendkim.sock

Not only was the wrong line commented out, but socket which should have been 8891 was 8892? Afetr changing it to the below

Socket                  inet:8891@localhost
#Socket local:/var/run/opendkim/opendkim.sock

Now going back into Virtualmin and enabling DKIM fixed the issue

Interesting\\ Helpful?
YN

Leave a Reply

Your email address will not be published. Required fields are marked *