Jeff Jansen wrote:

On Tuesday 29 July 2003 05:16, Scott wrote:

/usr/lib/courier/bin/maildrop: Unable to filter message.

Then I noticed that if I removed my maildroprc (which is there primarily
for spamassassin filtering), the emails would be delivered and the
testuser .mailfilter works.  However, I lose the ability to do universal
filtering with maildrop.

Short of putting spamassassin filter rules into every user's
.mailfilter, how can I have both maildroprc universal filtering AND
virtual user maildrop filters?  Or can I?


Yes, maildrop will run the instructions in the global maildroprc file AND it will run .mailfilter instructions for that user. If removing the maildroprc file solved your problem then you need to check out that file.

Try this. Put your "bad" maildroprc file back and then save a message to your hard drive. Then manually run maildrop on this message with debugging turned on full (-V 9) and what what happens. It should tell you where the error is.

I threw a bad line into my maildroprc file and then did this - here's what I got back

[EMAIL PROTECTED] tmp]$ maildrop -V 9  < msg
maildrop: Changing to /home/jeff
Message start at 0 bytes, envelope sender=jeff
Tokenized if
Tokenized regexp: /Subject: Helping/
/etc/courier/maildroprc(1): Syntax error after if
[EMAIL PROTECTED] tmp]$

So you see it caught my error and showed me (sort of) where it was. See what errors it shows you.

Thanks Jeff,


I get the following error from msgs/ queue while the message sits in the spool undelivered (at least it looks like an error):

[EMAIL PROTECTED] msgs]# more 17/C9240717
[EMAIL PROTECTED]
fdns; troutpocket.org ([::ffff:216.254.17.40])
e
t
M008D008D.3F2773EF.0000018B
[EMAIL PROTECTED]
R
N
E1060154991
p1059578991
W1059564591
A1059550191
I0 R getpwuid failed: Success
I0 R maildrop: error writing to filter.
I0 R /usr/lib/courier/bin/maildrop: Unable to filter message.
D0 1059550191
C1059550191
A1059550491

However, running maildrop by hand with verbose debugging I get:

/etc/courier/maildroprc(4): import  "SENDER"
/etc/courier/maildroprc(5): import  "RECIPIENT"
/etc/courier/maildroprc(7): SH_SENDER=""
/etc/courier/maildroprc(8): SH_RECIPIENT=""
/etc/courier/maildroprc(9): SH_SENDER=""
/etc/courier/maildroprc(10): SH_RECIPIENT=""
/etc/courier/maildroprc(11): Evaluating IF condition.
/etc/courier/maildroprc(11): Operation on:  and  - string equal, result is 1
/etc/courier/maildroprc(11): IF evaluated, result=1
/etc/courier/maildroprc(13): SH_SENDER="unknown"
maildrop: Filtering through xfilter spamc
maildrop: Attempting .mailfilter
maildrop: Delivering to ./Maildir
maildrop: Flock()ing ./Maildir.
maildrop: Appending to ./Maildir.
maildrop: Delivery complete.

If I remove the maildroprc it delivers fine. However, there isn't an error in my maildroprc as far as I can tell:

[EMAIL PROTECTED] root]# cat /etc/courier/maildroprc
#Global mail filter settings for Courier Maildrop

# Run virus scanner
        import SENDER
        import RECIPIENT
# ONLY use the excaped values when running shell commands
        SH_SENDER=escape($SENDER)
        SH_RECIPIENT=escape($RECIPIENT)
        SH_SENDER=$SENDER
        SH_RECIPIENT=$RECIPIENT
        if ($SH_SENDER eq "")
        {
                SH_SENDER="unknown"
        }

#run Spamassassin
        xfilter "spamc"

I'm lost as to why this is happening. Any ideas?

-Scott



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to