6 messages in net.sourceforge.lists.courier-users[courier-users] Re: Autoresponder usi...
FromSent OnAttachments
Joseph C. EkstromJun 23, 2003 6:33 pm 
MH - EntwicklungJun 23, 2003 11:27 pm 
Greg JohnstoneJun 24, 2003 6:01 pm 
Sam VarshavchikJun 24, 2003 6:58 pm 
Greg JohnstoneJun 24, 2003 10:08 pm 
Sam VarshavchikJun 24, 2003 10:52 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] Re: Autoresponder using .mailfilterActions...
From:Sam Varshavchik (mrs@courier-mta.com)
Date:Jun 24, 2003 10:52:04 pm
List:net.sourceforge.lists.courier-users

Greg Johnstone writes:

The .mailfilter file contains the following (taken from the mailbot man pages):

cc "./Maildir" cc "| mailbot -t autoresponse -d dupdb -D 1 -s 'User is on leave' -A 'From: us@domain.com.au'" EXITCODE = 0 exit

Should I be able to use a .mailfilter file as well as maildroprc?

Yes, provided that nothing in maildroprc terminates mail filtering (such as an exit, or a to command).

Well, there's no 'exit', 'to' or anything that terminates maildrop that I can
see. But it's even more mysterious than that.

I put log statements in maildroprc and the .mailfilter to see where things got to. The maildroprc seems to get to the end, however, with the .mailfilter in place the mail never gets delivered. As soon as I take the .mailfilter away all the mail (including the 'missing' mail eventually) gets delivered.

This indicates that either a parsing error, or a temporary runtime error occured when processing .mailfilter; both end up deferring mail.

Here's the maildroprc:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VERBOSE=9 import SENDER import RECIPIENT import HOME logfile "spamlog" log "Maildrop started" log "$HOME" PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/courier/bin/ INBOX="Maildir/" DEFAULT="$INBOX" SPAMFLD="$INBOX.Trash/" SHELL=/bin/ash log "$INBOX"

# create needed directory `test -d "$SPAMFLD"` if( $RETURNCODE == 1 ) { `maildirmake "$SPAMFLD"` }

# filter message log "About to filter" xfilter "/usr/bin/spamc" log "Return from filter" if (/^X-Spam-Flag: *YES/) { DEFAULT="$SPAMFLD" } log "Finished" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

And here's the .mailfilter (I have tried this both with and without the 'cc'
statement):

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VERBOSE=9 logfile "filter.log" log "mailfilter started" cc "./Maildir"

Is there an existing $HOME/filter.log, and, if so, do the permission/ownership of the file allow the log file to be appended to?

What exactly is logged to your syslog, for a delivery attempt when the .mailfilter is installed.

Remember, .mailfilter must have 0600 permissions.