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

#!/bin/bash

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 [EMAIL PROTECTED] [EMAIL PROTECTED]



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

Return-Path: <[EMAIL PROTECTED]>Delivered-To: [EMAIL PROTECTED]
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) (192.168.0.20)
 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 [EMAIL PROTECTED] [EMAIL PROTECTED]
qmail-inject: fatal: unable to parse this line:
Return-Path: <[EMAIL PROTECTED]>Delivered-To: [EMAIL PROTECTED]

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    : [EMAIL PROTECTED]
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             [EMAIL PROTECTED]

ci.fct.unl.pt:~# _


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to