From: Theodore Knab [mailto:[EMAIL PROTECTED]
>
> I have a use question with the maildrop filtering program with
> Courier.
>
> More specifically, I want to use both the global and local filters.
>
> Can both be used ?
>
> I am running maildrop without any flags. Do I need to have a flag
> to do this ?
>From the maildrop man page:
If the file /etc/courier/maildroprc exists, mail delivery or mail
filtering instructions are read from that file. maildrop's
delivery/filtering instructions may direct maildrop to save the
message in specific mailbox, discard it, return it to sender, or
forward it to a different E-mail address.
If /etc/courier/maildroprc does not exist, or its mail
delivery instructions do not completely dispose of this message,
maildrop then reads the mail delivery instructions from
$HOME/.mailfilter. If it doesn't exist, or its mail delivery
instructions do not completely dispose of the message, maildrop
then saves the E-mail message in the default mailbox.
So, the global filter is run first and then the local filter.
> Here is my global maildrop config in '/etc/courier/maildroprc':
>
> import SENDER
> import RECIPIENT
> import HOME
> MAILBOX="$HOME/Maildir"
> MAILDIRQUOTA="$MAILBOX/maildirsize"
> #SPAM ASSASSIN is only called
> #if message is small
> if ($SIZE < 26144)
> {
> exception {
> #xfilter "/usr/bin/reformail -I \"X-SpamProbe: $SCORE\""
> xfilter "/usr/bin/spamassassin"
> }
> }
>
> #if the message is tagged as spam put it into the SPAM MAILBOX
> #otherwise put it in the standard maildir
> if (/^X-Spam-Flag: *YES/)
> {
> exception {
> to "$HOME/Maildir/.Spam"
> }
> }
> else
> {
> exception {
> to "$HOME/Maildir/"
> }
> }
> #Delivery Quota
> if ($SENDER ne "")
> {
> FROM=$SENDER
> }
> else
> {
> FROM="unknown"
> }
> xfilter "/usr/bin/deliverquota -w 90 $MAILBOX"
This filter will probably not do what you want. The part above the
'#Delivery Quota' line is sufficient to deliver the message, so
nothing below that will be seen. Also, the local mailfilter files
will never be seen since the global file takes care of the mail.
I don't think an xfilter is the correct way to run deliverquota
either. But if you have a recent version of Courier, you don't need
to run deliverquota at all. The quota checking has been integrated
into maildrop. Just put the '-w 90' option on maildrop in the
DEFAULTDELIVERY variable in /etc/courier/courierd.
> Here is my local user .mailfiter
As I said above, this will never be seen. I would suggest doing
this:
In /etc/courier/courierd, change the default delivery line to this:
DEFAULTDELIVERY="| /usr/lib/courier/bin/maildrop -w 90"
/etc/courier/maildroprc:
import SENDER
#SPAM ASSASSIN is only called
#if message is small
if ($SIZE < 26144)
{
exception {
xfilter "/usr/bin/spamassassin"
}
}
#if the message is tagged as spam put it into the SPAM MAILBOX
#otherwise ***LEAVE IT ALONE FOR THE LOCAL CONFIG TO DELIVER***
if (/^X-Spam-Flag: *YES/)
{
exception {
to "./Maildir/.Spam"
}
}
#Delivery Quota
if ($SENDER ne "")
{
FROM=$SENDER
}
else
{
FROM="unknown"
}
$HOME/.mailfilter:
if (/^Subject: Test/ )
{
to "./Maildir/.Trash/"
}
Hopefully this helps.
Bowie
-------------------------------------------------------
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