Hello!

I use for a long time Ham and Spam folders and suppose that many
courier users also create them using maildroprc. Anyway I made small
changes to webmail to have these folders exist by default.
Is it possible to include in future releases of courier-webmail these
Spam and Ham folders?
I also use scripts, maybe ugly, to learn messages by spamassassin
located within Spam and Ham folders...
To check by spamc I use maildroprc:
###############################################################################
#
# Use SpamAssassin to filter SPAM
#
###############################################################################
if ( !/^Received: from .* \(.*\[200\.201\.110\.[0-9]{1,3}\]\)/ )
{
    if ( $SIZE < 524288 )
    {
        exception {
            xfilter "/usr/bin/spamc -u $RECIPIENT"
        }
    }
}

if ( /^To:.*undisclosed-recipients:/ )
{
    exception {
        to "${TRASH}"
    }
}

if ( /^X-Spam-Flag: *YES/ )
{
    `test -f $MAILDIR/courierpop3dsizelist && test ! -f
$MAILDIR/courierimapuiddb`
    if ( $RETURNCODE == 0 )
    {
        SUBJECT=`/usr/bin/reformail -x Subject:`
        SUBJECT=escape(${SUBJECT})
        xfilter '/usr/bin/reformail -A"Subject: ***** SPAM ***** ${SUBJECT}"'
    }
    else
    {
        exception {
            to "${SPAM}"
        }
    }
}


Hope these files would be helpfull.

-- 
Best Regards,

Vasiliy Kotikov

Attachment: learn_ham
Description: Binary data

Attachment: learn_spam
Description: Binary data

Attachment: webmail-ham-spam.patch
Description: application/force-download

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to