You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Diego Pomatta <in...@abelsonsa.com.ar> on 2007/07/17 18:36:16 UTC

Help with some spamd errors/warnings

Hey all,

Now that I got the spamd log working again, I keep seeing these errors:
warn: util: secure_tmpfile failed to create file 
'/root/tmp/.spamassassin7688bq4Fdstmp': Permission denied  (many times)

and then...

warn: print() on closed filehandle $tmpfile at 
/usr/lib/perl5/5.8.3/i386-linux-thread-multi/IO/Handle.pm line 399, 
<GEN123> line 929.
warn: seek() on closed filehandle $tmpfile at 
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Message/Node.pm line 305.
warn: readline() on closed filehandle $tmpfile at 
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Message/Node.pm line 307.
warn: Use of uninitialized value in substitution (s///) at 
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Util.pm line 602.
warn: Use of uninitialized value in length at 
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Util.pm line 603.
warn: Use of uninitialized value in pattern match (m//) at 
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Util.pm line 603.
warn: Use of uninitialized value in transliteration (tr///) at 
/usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Util.pm line 620.

...and some more. which I assume are consequence of the first one.
What I don't get is why it can't write to /root/tmp. I've checked 
permissions and it should be able to.
In any case, what can I do? is that temp file path customizable?
What impact is this having in SA performance or work?

SA 3.2.1 - Simscan 1.3.1 - qmail 1.05
Thanks in advance!
/Regards

Re: Help with some spamd errors/warnings

Posted by Diego Pomatta <in...@abelsonsa.com.ar>.
Theo Van Dinter wrote:
> On Tue, Jul 17, 2007 at 01:36:16PM -0300, Diego Pomatta wrote:
>   
>> Now that I got the spamd log working again, I keep seeing these errors:
>> warn: util: secure_tmpfile failed to create file 
>> '/root/tmp/.spamassassin7688bq4Fdstmp': Permission denied  (many times)
>>
>>     
>> What I don't get is why it can't write to /root/tmp. I've checked 
>> permissions and it should be able to.
>>     
>
> is the child spamd process running as root?  does /root/tmp exist?  is there
> some acl on the directory/etc ?
>
>   
Yep, they all run as root.

[]# ps -edaf|grep spamd
root      7683     1  0 11:04 ?        00:00:02 /usr/bin/perl5.8.3 -T -w 
/usr/bin/spamd -l -L -s stderr -r /var/run/spamd.pid 
--siteconfigpath=/etc/mail/spamassassin --nouser-config 
--socketpath=/tmp/spamd.sock
qmaill    7684     1  0 11:04 ?        00:00:00 /usr/local/bin/multilog 
t n20 s1000000 /var/log/spamd
root     18898  7683  0 14:26 ?        00:00:05 spamd child
root     28538  7683  0 17:04 ?        00:00:00 spamd child

 The directory /root/tmp exists
drwxrwx---  11 root root  4096 jul 17 16:57 tmp/

[/]# getfacl root/tmp
file: root/tmp
owner: root
group: root
user::rwx
group::rwx
other::---

>> In any case, what can I do? is that temp file path customizable?
>>     
>
> It uses $ENV{'TMPDIR'} or File::Spec->tmpdir() if it's not set.  According to
> the POD, tmpdir() uses $ENV{'TMPDIR'} or "/tmp".  So my guess is that you
> already have TMPDIR set, potentially incorrectly.
>   
Yes I have:
TMP=/root/tmp
TMPDIR=/root/tmp

>> What impact is this having in SA performance or work?
>>     
> Only non-text parts should be written out to a temp file, so it would
> impact any code that looks at the non-text part data.  This should (iirc)
> be limited to any third party plugins, such as FuzzyOCR, etc.
>
> However, the first failure should be caught but apparently isn't.  Can you
> open a bugzilla ticket about this?  Thanks. :)
>   
Thanks for the explaination.
About the bugzilla ticket... sure, first thing in the morning tomorrow 
when I get back. ;)

/Regards


Re: Help with some spamd errors/warnings

Posted by Theo Van Dinter <fe...@apache.org>.
On Tue, Jul 17, 2007 at 01:36:16PM -0300, Diego Pomatta wrote:
> Now that I got the spamd log working again, I keep seeing these errors:
> warn: util: secure_tmpfile failed to create file 
> '/root/tmp/.spamassassin7688bq4Fdstmp': Permission denied  (many times)
> 
> and then...
> 
> warn: print() on closed filehandle $tmpfile at 
> /usr/lib/perl5/5.8.3/i386-linux-thread-multi/IO/Handle.pm line 399, 
> <GEN123> line 929.
> warn: seek() on closed filehandle $tmpfile at 
> /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Message/Node.pm line 305.
> 
> ...and some more. which I assume are consequence of the first one.

yep.

> What I don't get is why it can't write to /root/tmp. I've checked 
> permissions and it should be able to.

is the child spamd process running as root?  does /root/tmp exist?  is there
some acl on the directory/etc ?

> In any case, what can I do? is that temp file path customizable?

It uses $ENV{'TMPDIR'} or File::Spec->tmpdir() if it's not set.  According to
the POD, tmpdir() uses $ENV{'TMPDIR'} or "/tmp".  So my guess is that you
already have TMPDIR set, potentially incorrectly.

> What impact is this having in SA performance or work?

Only non-text parts should be written out to a temp file, so it would
impact any code that looks at the non-text part data.  This should (iirc)
be limited to any third party plugins, such as FuzzyOCR, etc.

However, the first failure should be caught but apparently isn't.  Can you
open a bugzilla ticket about this?  Thanks. :)

-- 
Randomly Selected Tagline:
"True hackers don't die, their ttl expires" - Unknown