[Mimedefang] Unknown command '^W' in RESULTS file

Josh Kelley joshkel at gmail.com
Wed Mar 7 14:04:21 EST 2007

On 3/7/07, David F. Skoll <dfs at roaringpenguin.com> wrote:
> I can't see how embedded Perl could cause this.  The RESULTS file is
> opened in the MIMEDefang slave long after the fork and all file descriptors
> have been closed.  I could be wrong, but I just don't see it.

As a hypothetical example, the nss_ldap libraries which are loaded by
Mimedefang and SpamAssassin would open FD 3 as a connection to an LDAP
server and leave it open for performance, then Mimedefang would close
FD 3 when forking and reopen it as an output handle to RESULTS.  So
the next name lookup call would invoke nss_ldap, which would write out
LDAP commands to FD 3, and Mimedefang would see the LDAP data in the
RESULTS file and error out.

I did enough investigating to convince myself that _something_ like
this was happening, but I never figured out the exact circumstances.
On my system, at least, it didn't happen very often, and it was highly
dependent on whether or not nscd was running (maybe because nscd opens
the LDAP connections if it's running, or maybe because an open FD to
nscd's socket is also involved).

Without embedded Perl, SpamAssassin doesn't initialize until after the
fork, so no FDs are opened then forced closed.

Josh Kelley

More information about the MIMEDefang mailing list