Hi Tica, Tica wrote:
After a few tries (it was my mistake about the the patch error) I was able to patch spamd, but after a few testing, I needed to fall back to unpatched 3.2.5 The patched version was with two problems: 1. Spam scanning was not working... I got the same error to a lot of incoming e-mails. SA:0(?/?) 2. a lot of error like this at spamd logs: Wed Jul 16 18:24:28 2008 [7992] warn: Unsuccessful stat on filename containing newline at /usr/sbin/spamd line 2329, <GEN14> line 2. Wed Jul 16 18:24:28 2008 [7992] warn: Unsuccessful open on filename containing newline at /usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin.pm line 1088, <GEN14> line 2. Wed Jul 16 18:24:28 2008 [7992] warn: Unsuccessful stat on filename containing newline at /usr/lib/perl5/site_perl/5.8.8/Mail/SpamAssassin.pm line 1575, <GEN14> line 2. Wed Jul 16 18:24:28 2008 [7992] warn: Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.8/File/Path.pm line 159, <GEN14> line 2. Wed Jul 16 18:24:28 2008 [7992] warn: Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.8/File/Path.pm line 161, <GEN14> line 2. Wed Jul 16 18:24:28 2008 [7992] warn: Unsuccessful stat on filename containing newline at /usr/lib/perl5/5.8.8/File/Path.pm line 159, <GEN14> line 2. Wed Jul 16 18:30:03 2008 [7992] info: spamd: connection from localhost.localdomain [127.0.0.1] at port 59846 Wed Jul 16 18:30:03 2008 [7992] warn: spamd: failed to resolve vpopmail user/alias '[EMAIL PROTECTED]' using vuserinfo/valias at /usr/sbin/spamd line 2131, <GEN22> line 2.
oh, my bad. Seems I focused too much on the vpopmail error handling and forgot to take care of the most common use cases...
The attached patch solves this problem, as also mentioned in bug 5943 ¹. Thanks a bunch for testing and reporting! Cheers, Daniel ¹ <https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5943>
--- spamd/spamd.raw (revision 677728) +++ spamd/spamd.raw (working copy) @@ -2093,7 +2093,9 @@ use re 'taint'; my $vpopdir = $suiddir; # This should work with common vpopmail setups $userdir = `$vpopdir/bin/vuserinfo -d \Q$username_untainted\E`; - if ($? != 0) { + if ($? == 0) { + chomp($userdir); + } else { $userdir = handle_user_vpopmail($username_untainted,$vpopdir); } } else {