0
down vote
favorite
We're using opendkim with postfix (multi-instance), for signing outgoing mail. At busy moments, opendkim logs the following error:
warning: milter unix:/var/run/opendkim/opendkim.sock: read error in initial handshake
Sep 8 16:00:14 telemann postfix-15/smtpd[24178]: warning: milter unix:/var/run/opendkim/opendkim.sock: can't read SMFIC_OPTNEG reply packet header: Connection reset by peer
And this:
opendkim[14581]: OpenDKIM Filter: accept() returned invalid socket (Numerical result out of range), try again
I understand this can be solved by using using poll() instead of select(), so I've compiled opendkim with --enable-poll, but this does't help.
When stracing the binary, it seems to be still using select:
strace -p 14581
Process 14581 attached
select(6, [5], NULL, [5], {2, 959258}) = 0 (Timeout)
select(6, [5], NULL, [5], {5, 0}) = 0 (Timeout)
How can I check if the binary is using poll? If not, how should I compile opendkim? Or is there another way to solve this?
(I'm not very good at C/C++ unfortunately).
Does compiling libmilter with
SM_CONF_POLLbefore linking it withopendkimhelp?Looking at the code of opendkim the only impact of specifying
./configure --enable-pollis thatopendkim -VprintsPOLL. The last calls withinopendkimforpollwere removed by commit b6967980bee : Feature request #SF3544764: Support for libar has been discontinued.opendkim[14581]: OpenDKIM Filter: accept() returned invalid socket (Numerical result out of range), try againis generated by libmilter and according to my understanding, looking at its source means:Last edit: Dilian Wesselinov Palauzov 2017-11-13
Hi Dilian,
Thanks, yes, we did it like this (enable polling):
./configure --with-odbx --with-openssl=/usr/include/openssl
--enable-poll --prefix=/opt/opendkim --exec-prefix=/opt/opendkim
CFLAGS=-g -O2 -w -DFD_SETSIZE=8192 -FD_SETSIZE=8192
LDFLAGS=-L/home/blah/src/sendmail-xxxx/obj.Linux.3.xxxxxxxx/libmilter/
-lmilter --with-milter=/home/blah/src/sendmail-xxxxxxx
Met vriendelijke groet,
Stijn van der Ree
--
Verstuur je nieuwsbrieven met Laposta!
https://laposta.nl
On Sun, Nov 12, 2017, at 18:06, Dilian Wesselinov Palauzov wrote:
Related
Support Requests: #41
--enable-poll doesn't do anything.
From your message it is unclear, whether you #define SM_CONF_POLL while you build libmilter and whether this helps, hence the problem is within libmilter using select instead of poll.