pointless.net  • Blog • Photos • About


2006- 08-01

problems with exim and libspf2

August 1, 2006

Exim (4.62) is not pthread aware, and uses _res to alter and query the current resolver state.

Under NetBSD (and other things too afaict from googleing) _res isn't thread safe so programs that are linked with libpthread break.

Unfortunatly the way NetBSD's pthreads implementation handles this is to write a message to stderr (which is /dev/null in a daemon) and call abort(), which is fairly unhelpful when it comes to diagnosing things.

so - if you get the following symptoms:

exim runs ok but immediatly closes any connections it gets with no messages in it's log file. Then it's caused by _res and libpthread.

There are two ways to fix it - either alter libspf2 to not use pthreads or to alter exim to not use _res.

I changed exim - it was simpler to do, and i'm sure the same thing will happen with other 3rd party libraries in the future.

You can grab the patch from my post to the exim mailing list.




Valid HTML 4.01! Valid CSS! ipv6 ready