While trying to debug another problem (Courier 0.42.2, Solaris 8),
I discovered the following anomaly:

The start of my "maildroprc" file is a pretty common template for use
with SpamAssassin:

import SENDER
import RECIPIENT
import HOME
import USER
import SIZE
import LOGNAME
PATH=/bin:/usr/bin:/usr/local/bin:/opt/courier/bin/:/usr/perl5/bin
INBOX="Maildir/"
DEFAULT="$INBOX"
#SPAMFOLDER="$INBOX.SPAM/"
SHELL=/sbin/sh
LCRECIPIENT=tolower($RECIPIENT)
LCUSER=tolower($USER)

if (( $SIZE < 26144 ) \

[... and a few other header filter content checks here ... ]

{
        exception {
                xfilter "/usr/perl5/bin/spamc -u $LCUSER"
        }
}
[...]

I took a test message ("anacron" output from a rebooted Linux box) and
ran it through "maildrop" at VERBOSE level 9:

solaris8box# /opt/courier/bin/maildrop -V 9 -d < /tmp/Anacron

In the debug output, I see:

maildrop: Changing to /
Message start at 0 bytes, envelope sender=root
Tokenized import
Tokenized string: "SENDER"
Tokenized ;
[...]
Tokenized import
Tokenized string: "SIZE"
Tokenized ;
[...]
Tokenized if
Tokenized (
Tokenized (
Tokenized string: "$SIZE"
Tokenized <
Tokenized string: "26144"
Tokenized )
[...]
Tokenized eof
/opt/courier/etc/maildroprc(1): import  "SENDER"
/opt/courier/etc/maildroprc(2): import  "RECIPIENT"
/opt/courier/etc/maildroprc(3): import  "HOME"
/opt/courier/etc/maildroprc(4): import  "USER"
/opt/courier/etc/maildroprc(5): import  "SIZE"
/opt/courier/etc/maildroprc(6): import  "LOGNAME"
/opt/courier/etc/maildroprc(7): PATH="/bin:/usr/bin:/usr/local/bin:/opt/courier
/bin/:/usr/perl5/bin"
/opt/courier/etc/maildroprc(8): INBOX="Maildir/"
/opt/courier/etc/maildroprc(9): DEFAULT="Maildir/"
/opt/courier/etc/maildroprc(11): SHELL="/sbin/sh"
/opt/courier/etc/maildroprc(12): LCRECIPIENT=""
/opt/courier/etc/maildroprc(13): LCUSER="root"
/opt/courier/etc/maildroprc(16): Evaluating IF condition.
/opt/courier/etc/maildroprc(16): Operation on:  and 26144 - less than, result 
is 1
/opt/courier/etc/maildroprc(17): Operation: logical and, left hand side=1
/opt/courier/etc/maildroprc(17): Operation: logical and, evaluating right hand 
size.
Start node: 0

The test message ("/tmp/Anacron") is 121402 bytes.  I would've expected to
see either

/opt/courier/etc/maildroprc(16): Operation on: $SIZE and 26144 - less than, 
result is 0

or

/opt/courier/etc/maildroprc(16): Operation on: 121402 and 26144 - less than, 
result is 0

instead of what the actual debug output is.

It looks to me like $SIZE isn't really being imported here.  Is this, indeed,
the case?  Or is $SIZE not imported in a "debug" environment like this?
(That makes no sense to me, if so - $USER appears to be getting imported
 properly, for example)

I also tried "if (($LINES < 100) \ " in place of "if (($SIZE < 26144) \",
with the exact same results ... so either $LINES and $SIZE aren't being
imported, or I'm misinterpreting the output pretty badly ...

        - Greg




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to