On Jul 12, 2004, at 5:54 AM, WebKommerz wrote:
The setup:
In my first tries, i placed the pipe-Filter in the Userdir-.qmail-file (.qmail) which turned into a loop since vdelivermail reprocessed the .qmail ... :) => WRONG PLACE for my filterprogram! Of course i changed it. The filter is now called in the .qmail-user-file (e.g. .qmail-robot) stored in the Domain Dir:
Contents of the .qmail-robot:
|/usr/home/webkommerz.de/cgi-bin/cone/mod_recycle_mail.pl /usr/local/vpopmail/domains/flenschat.de/robot/Maildir/
The Programm filters the incoming Mail (STDIN) and passes it to vdelivermail, if it isnt Spam (perl-snippet):
   open(XXX,"|/usr/local/vpopmail/bin/vdelivermail '' $xMAILDIR") or die $!;
   print XXX <STDIN>;

That's not the proper way to call vdelivermail. You may think you're saying, "Put this email in that Maildir", but what you're really saying is, "if you can't find a place to deliver this email, put it in that Maildir".

It would be much simpler to look at the exit codes that qmail-local checks for, and redo your .qmail-robot as follows:


Then, have mod_recycle_mail.pl exit with the code for "don't deliver mail" if it's spam, and exit with the code for "continue processing .qmail file" if it's not spam.

Tom Collins  -  [EMAIL PROTECTED]
QmailAdmin: http://qmailadmin.sf.net/  Vpopmail: http://vpopmail.sf.net/
Info on the Sniffter hand-held Network Tester: http://sniffter.com/

Reply via email to