Re: spamd socket partial read

2009-07-23 Thread Filippo Carletti
 This plugin sends the full mail to spamd, but spamd reads only the
 headers and wait for 300 seconds for the body (already sent by
 qpsmtpd).

Solved.

The ipp2p (p2p block) firewall rules were active on localhost and
blocking connection to spamd via socket on port 783 for that
particular mail.
Sorry for the noise.

-- 
Ciao,
Filippo


spamd socket partial read

2009-07-17 Thread Filippo Carletti
Please, refer to this mail
(http://grokbase.com/post/2009/07/15/spamassassin-plugin-doesn-t-send-full-mail-to-spamd/JCzoiz1UQ8ZKEInNXZQu0ndhk54)
for some (confused) background informations.

qpsmtpd spamassassin plugin is here:
http://github.com/abh/qpsmtpd/blob/7efee7b1af632fc1caf1a03a00b4d36790f25c1d/plugins/spamassassin

This plugin sends the full mail to spamd, but spamd reads only the
headers and wait for 300 seconds for the body (already sent by
qpsmtpd).

spamd strace:

read(6, SYMBOLS SPAMC/1.3\r\nUser: qpsmtpd\r\n\r\nX-Envelope-From:
perceptua...@studguard.de\r\nReceived: from c2.nethesis.it (HELO
pc-federico) (77.238.14.78)\r\nby nethesis.it (qpsmtpd/0.40) with
SMTP; Wed, 15 Jul 2009 18:17:09 +0200\r\nDate: Tue, 14 Jul 2009
19:00:57 +0700\r\nFrom: \Pat Bright\
forbidding...@sparkus.com\r\nSubject: Get a degree with no
problems.\r\nTo: cristian.man...@nethesis.it\r\nMessage-ID:
000d01ca047a$bf729840$6400a...@forbiddingsz3\r\nMIME-Version:
1.0\r\nX-MIMEOLE: Produced By Microsoft MimeOLE
V6.0.6001.18049\r\nX-Mailer: Microsoft Windows Mail
6.0.6001.18000\r\nContent-type: text/plain; format=flowed;
charset=iso-8859-1; reply-type=original\r\nContent-transfer-encoding:
7bit\r\nX-Priority: 3\r\nX-MSMail-priority: Normal\r\n\r\n, 4096) =
733

SA 3.2.5 on Centos 4.6, perl 5.8.5.

If I shorten the first line of the body, spamd reads the whole mail
(see mail referenced at the beginning for a strace).
Here is also a gdb backtrace of spamd waiting in read():

#0  0x009d17a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0x00cff673 in __read_nocancel () from /lib/tls/libpthread.so.0
#2  0x00cbb09f in PerlIOUnix_read () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#3  0x00cba8b1 in Perl_PerlIO_read () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#4  0x00cbc439 in PerlIOBuf_fill () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#5  0x00cb9a43 in Perl_PerlIO_fill () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#6  0x00cba803 in PerlIOBase_read () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#7  0x00cbc513 in PerlIOBuf_read () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#8  0x00cba8b1 in Perl_PerlIO_read () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#9  0x00cbdb14 in PerlIO_getc () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#10 0x00c64e6b in Perl_sv_gets () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#11 0x00c48aa4 in Perl_do_readline () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#12 0x00c49877 in Perl_pp_readline () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#13 0x00c3016d in Perl_runops_debug () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#14 0x00be1c91 in perl_run () from
/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE/libperl.so
#15 0x080493b2 in main ()

I'm looking for a way to isolate the source of the problem: perl, a
perl module, spamd, spamassassin, what else?
Thanks.

-- 
Ciao,
Filippo