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

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"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

With no .mailfilter, the spamlog looks like this, and the mail is delivered:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Maildrop started
/home/greg
Maildir/
About to filter
Return from filter
Finished
Date: Wed Jun 25 14:33:02 2003
From: "Greg Johnstone" <[EMAIL PROTECTED]>
Subj: TEST
File: Maildir/                                                          (1256)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

With the .mailfilter in place, everything after 'Finished' is missing from 'spamlog' 
and no .mailfilter logfile (filter.log) is produced.

I don't know at what point the last 4 log entries are produced. Perhaps they are 
buffered and tacked on at the end or maybe maildrop indicating that it has delivered 
the mail.

According to the maildrop man page, maildrop first reads maildroprc then .mailfilter, 
but I can't get anything to work if .mailfilter exists. I'm using courier 0.40.1.

Regards

Greg Johnstone.

 



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to