[maildropl] Problems with maildroprc
Brought to you by:
mrsam
From: Postmaster <pos...@of...> - 2003-11-03 07:03:25
|
I am attempting to set up a maildroprc file that will scan for spam, mark suspected spam, and then continue with delivery as otherwise specified in .qmail. If there is not an indication to forward mail, then it should put the mail in the mailbox. This is my test file - which doesn't work: import EXT import HOST VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST` if ( $SIZE < 262144 ) { xfilter "/usr/bin/spamc -f -u $EXT@$HOST" } `grep -q "^&" $VHOME/.qmail` if ( RETURNCODE == 0 ) { exit; } else { to $VHOME/Maildir exit } What I want this to do is look for an "&" as the first charcter of the file; if it exists, then exit; if not deliver the mail. (I will be changing the grep to a program that will look to see if there are any non-blank lines after the "|maildrop" line; exiting 0 if there is, 1 if there is not.) Currently, no mail is delivered. I based this on my original maildroprc file, which was: import EXT import HOST VHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST` if ( $SIZE < 262144 ) { xfilter "/usr/bin/spamc -f -u $EXT@$HOST" if (/^X-Spam-Flag: *YES/) { `test -d $VHOME/Maildir/.JunkMail` if( $RETURNCODE != 1 ) { to $VHOME/Maildir/.JunkMail exit } else { to $VHOME/Maildir exit } } else { to $VHOME/Maildir exit } } else { to $VHOME/Maildir exit } Unfortunately, this would deliver mail to the local directory even if there was forwarding present. (I understand that the "to $VHOME/Maildir" did that; hence the changes.) I also do not use .JunkMail directory. I have subscribed to the mailing list, but have not yet received a confirmation; as a result, please cc a copy of your response to me. Thanks, Ken |