[Dovecot] mailtrain with dovecot antispam plugin

Hugo Monteiro hugo.monteiro at fct.unl.pt
Sat Apr 19 19:40:48 EEST 2008

Hello all, and Johannes if you're around,

I was trying to set up the "new" antispam plugin with the mailtrain 
backend, and i was trying to use the sendmail binary that's part of a 
qmail system. The message wouldn't get sent and i kept getting exit 
error 100 from the /var/qmail/bin/sendmail binary. To try to figure out 
what was happening, i mean a fake sendmail program, which is nothing 
more than a bash script to capture the command call input.

The script is rather simple, it just places the calling parameters into 
a txt file and the stdin into another.

code is


echo $* > /tmp/sendmail-parms.txt
exec cat<&0 >> /tmp/sendmail-msg.txt

exit 0

So i tried a retrain and went to see what those txt files had. The 
parms.txt file was fine apparently, with cat /tmp/sendmail-parms.txt i got

-f hm at hmonteiro.net notspam-hm at hmonteiro.net

Then i did the same to the message file, with cat /tmp/sendmail-msg.txt, 
and i got the follwing

Return-Path: <hugo.monteiro at fct.unl.pt>Delivered-To: hm at hmonteiro.net
Received: (qmail 21616 invoked from network); 19 Apr 2008 16:21:17 -0000
Received: (simscan 1.4.1 ppid 21609 pid 21611 t 0.1451s)
 (scanners:  regex: 1.4.1 attach: 1.4.1 clamav: 0.92.1
/m:46/d:6803); 19 Apr 0108 16:21:17 -0000
Received: from femme-fatal.resnet.costabasto.com (HELO femme-fatal) 
  by hmonteiro.net with SMTP; 19 Apr 2008 16:21:17 -0000
Subject: buy some viagra HURRAY
X-DSPAM-Result: Innocent
X-DSPAM-Processed: Sat Apr 19 17:21:17 2008
X-DSPAM-Confidence: 0.4945
X-DSPAM-Probability: 0.0330
X-DSPAM-Signature: 480a1bfd216125429498786

viagra sale really HURRAY cheap! only $5!

As you can see, there is no new line in the first line. Return-Path and 
Delivered-To are set in a single line, which makes qmail-inject (which 
is later used by /var/qmail/bin/sendmail) to abort like this

cat /tmp/sendmail-msg.txt | /var/qmail/bin/sendmail -f hm at hmonteiro.net 
notspam-hm at hmonteiro.net
qmail-inject: fatal: unable to parse this line:
Return-Path: <hugo.monteiro at fct.unl.pt>Delivered-To: hm at hmonteiro.net

Before i go into digging the plugin code i was wondering if i'm not 
seing things clearly and thinking this is in fact a bug in the plugin code.

Thank you all in advance,

Hugo Monteiro.

ci.fct.unl.pt:~# cat .signature

Hugo Monteiro
Email	 : hugo.monteiro at fct.unl.pt
Telefone : +351 212948300 Ext.15307

Centro de Informática
Faculdade de Ciências e Tecnologia da
		   Universidade Nova de Lisboa
Quinta da Torre   2829-516 Caparica   Portugal
Telefone: +351 212948596   Fax: +351 212948548
www.ci.fct.unl.pt	      apoio at fct.unl.pt

ci.fct.unl.pt:~# _

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20080419/21ebadeb/attachment.bin 

More information about the dovecot mailing list