Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

hi i keep getting this error in maillog.any ideas

Jul 22 10:16:52 veepiz opendkim[5145]: OpenDKIM Filter: Unable to bind to port inet:20209@localhost: Address already in use
Jul 22 10:16:52 veepiz opendkim[5145]: OpenDKIM Filter: Unable to create listening socket on conn inet:20209@localhost
Jul 22 10:16:52 veepiz opendkim[5145]: smfi_opensocket() failed

#ps aux | grep opendkim
opendkim  1361  0.0  0.1  40424   780 ?        Ss   10:11   0:00 /usr/local/sbin/opendkim -x /etc/opendkim.conf
opendkim  1362  0.0  0.2  56948  1508 ?        Sl   10:11   0:00 /usr/local/sbin/opendkim -x /etc/opendkim.conf
opendkim  2256 19.6  0.1  40424   928 ?        Ss   10:16   1:18 /usr/local/sbin/opendkim -x /etc/opendkim.conf
root     20733  0.0  0.1  61224   740 pts/0    S+   10:23   0:00 grep opendkim

#netstat -nlp | grep 20209
tcp        0      0   *                   LISTEN      1362/opendkim
share|improve this question

Looks like you've already got at least one OpenDKIM process running, which is preventing it from starting a new one. Kill all the processes you found with ps aux | grep opendkim and then restart OpenDKIM.

share|improve this answer
If this fixed the problem, please mark your question as "answered." – SteveJ Aug 9 '11 at 17:54
Perhaps it fixed my problem :) – Karma Jul 28 '14 at 18:06

There is an "AutoRestart" option in dkim-filter.conf, which means that if the service is shutdown using "service dkim-milter stop", it will automatically restart itself. However, if you then try to start the service manually using "service dkim-milter start", it seems to create a second process and the server logs start filling up with the error message as the port is in use.

I have a script to manually check my mail server processes and restart them that was using the stop/start method, and experienced this problem.

Using "service dkim-milter restart" seems to work better, but occasionally I get the problem kicking in.

share|improve this answer

syntax, just rename Socket to SOCKET on DKIM-MILTER.CONF

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.