On Thu, Sep 14, 2006 at 11:08:04AM -0700, Pamela Rock wrote:
I've setup maildrop with sendmail and it appears to be
working with a few exceptions. I am not able to get
my filtering rules to work. Note however that email
is being delivered to the maildir.
[SNIP]
my /etc/maildroprc file looks like this....
SHELL="/bin/bash"
SENDMAIL="/usr/lib/sendmail"
MAILDROP="/usr/local/bin/maildrop"
logfile "/var/log/maildrop"
VERBOSE="4"
if (/^Subject:.*[:mailtestnow:]/ \
{
/dev/null
}
When an email with the subject mailtestnow shows up,
it is delivered to the user. Is the syntax totally
wrong, why can I not filter? Please help.
What's with "[:mailtestnow:]"? It may not mean what you think it means.
Maybe you meant:
if (/^Subject:.*mailtestnow/)
Also note that you had a typo above. You had a line continuation "\"
instead of a closing parenthesis ")".
Also, you had "/dev/null/" instead of "to /dev/null". Therein,
however, lies one of my pet peeves. Try this:
if (/^Subject:.*mailtestnow/)
{
log "Found mailtestnow. Dropping."
EXITCODE=0
exit
}
It's more efficient.