maildrop should move spam in spambox

Discussion in 'Installation/Configuration' started by admins, Feb 17, 2010.

  1. admins

    admins Member

    Hi all

    Amavis tags spam with ***SPAM*** in my rule.
    So I want, that maildrop checks if it haves a folder "spam" in the mailbox if no, he create a folder, if yes he puts the spam in this box.

    Has someone an idea how I could make this globally?

  2. BorderAmigos

    BorderAmigos New Member

  3. admins

    admins Member

    For all


    put following into:

    #####  Spamrule
    `test -e "$DEFAULT/.Spam" && exit 1 || exit 0`
    if ( $RETURNCODE != 1 )
            `maildirmake -f "Spam" $DEFAULT`
            `chmod -R 0700 "$DEFAULT/.Spam"`
            `echo "INBOX.Spam" >> $DEFAULT/courierimapsubscribed`
    if (/^Subject: \*\*\*SPAM/:h)
    exception {
    ID2EndFolder = "$DEFAULT/.Spam/"
    to $ID2EndFolder
    *** RULE End

Share This Page