[Mimedefang] relay_is_blacklisted_multi() multithreading problems?

David F. Skoll dfs at roaringpenguin.com
Thu Apr 23 10:46:14 EDT 2009


Erik Hensema / HostingXS wrote:

> relay_is_blacklisted_multi() seems to be the culprit. Are there any 
> multitheading issues with this function?

The Perl code in MIMEDefang is single-threaded.

> My filter first calls relay_is_blacklisted_multi() with a list of dns 
> whitelists. When $RelayAddr is whitelisted, the filter skips the second step, 
> in which dns blacklists are checked.

> However, in some (rare) cases relays are blocked even though there are 
> whitelisted and not blacklisted on any blacklist.
> I can't see how this can be caused by my filter code.

Could the whitelist lookup be timing out?  Add some print STDERR ... debugging
and see...

> The server I'm running mimedefang on is fairly busy. Typically 3-4 mimedefang 
> childs are running. We're peaking at about 2 smtp connections per second 
> sustained for several minutes. Typical load is 1 smtp connection per second.

:-) That is not "fairly busy" in my book.  We have a customer on whose
machine we see 95 busy scanners and we've seen 75 RCPTs per second with
10 scans per second.

> Because of the apparent random results, I suspect this to be a thread-safety 
> problem.

Nope.  MIMEDefang was designed from the ground up not to have thread-safety
issues; the Perl scanners are each isolated in their own process.

Regards,

David.



More information about the MIMEDefang mailing list