[exim] perl writes STDERR output to the client!

Top Page
Delete this message
Reply to this message
Author: Martin Nicholas
Date:  
To: Exim Users
Subject: [exim] perl writes STDERR output to the client!
I've cracked a problem causing disconnections by clients.
Output from perl's "warn" statement is written to the client interface by
default. Library routines (Mail::SRS for example) are unaware of this and the
client disconnects having been fed garbage.

Ths solution is to use this little bit of perly magic:

$SIG{__WARN__} = sub { Exim::log_write($_[0]) };

Output then goes to the logfile.

Probably a good idea for this to be the default in future versions.

An example SMTP session:
220-blah.co.uk ESMTP Exim Mailer
helo matey
250 blah.co.uk Hello matey [123.205.217.226]
mail from: <>
250 OK
rcpt to: srs0=wxvs3=p6=blah.co.uk=mart@???
SRS: Case insensitive hash match detected. Someone smashed case in the
local-part. at /usr/local/share/perl/5.6.1/Mail/SRS.pm line 421.
250 Accepted
quit
221 blah.co.uk closing connection

--
Regards,

Martin Nicholas.

E-mail: mgn@???