Added rule1
Added rule2
Added rule3
Added rule4
Added rule5
Added rule6
Error appending err1: 4
Error appending rule7: 4
Added err2
Error appending err3: 4
Error appending err4: 4
Error appending err5: 4
Error appending err6: 4
Error appending err7: 4
Added rule8
Error appending err8: 3
Error appending err9: 3
Error appending err10: 3
Added rule9
Error appending err11: 5
Error appending err12: 5
Added rule9b
Added rule10
Error appending err13: 3
Added rule11
Error appending err14: 4
Added rule12
Added ruleauto1
Added ruleauto2
Added utf8rulé
#MFMAILDROP=2
#
# DO NOT EDIT THIS FILE.  This is an automatically generated filter.

FROM='nobody@example.com'
##Op:startswith
##Header:subject
##Value:important
##Folder:.
##From:
##Name:rule1


if ((/^subject: *important/))
{
   to "Maildir/."
}

##Op:endswith
##Header:subject
##Value:notimportant
##Folder:.folder1
##From:
##DoesNot
##Name:rule2


if (!(/^subject:.*notimportant$/))
{
   to "Maildir/.folder1/."
}

##Op:contains
##Header:subject
##Value:everything
##Folder:.everything
##From:
##Name:rule3


if ((/^subject:.*everything/))
{
   to "Maildir/.everything/."
}

##Op:hasrecipient
##Header:
##Value:nobody@example.com
##Folder:.junk1
##From:
##Name:rule4


if ((hasaddr("nobody@example.com")))
{
   to "Maildir/.junk1/."
}

##Op:mimemultipart
##Header:
##Value:
##Folder:.attachments
##From:
##Name:rule5


if ((/^Content-Type: *multipart\/mixed/))
{
   to "Maildir/.attachments/."
}

##Op:textplain
##Header:
##Value:
##Folder:.nottext
##From:
##DoesNot
##Name:rule6


if (!( (! /^Content-Type:/) || /^Content-Type: *text\/plain$/ || /^Content-Type: *text\/plain;/))
{
   to "Maildir/.nottext/."
}

##Op:startswith
##Header:subject
##Value:no
##Folder:.
##From:
##Name:err2


if ((/^subject: *no/))
{
   to "Maildir/."
}

##Op:startswith
##Header:subject
##Value:(good)
##Folder:.
##From:
##Name:rule8


if ((/^subject: *(good)/))
{
   to "Maildir/."
}

##Op:startswith
##Header:subject
##Value:x
##Folder:!john@example.com mary@example.com
##From:
##Name:rule9


if ((/^subject: *x/))
{
    to "| $SENDMAIL -f " '""' " john@example.com mary@example.com"
}

##Op:startswith
##Header:
##Value:x
##Folder:.Sent
##From:
##Body
##Name:rule9b


if ((/^x/:b))
{
   to "Maildir/.Sent/."
}

##Op:startswith
##Header:subject
##Value:x
##Folder:*bounce
##From:
##Name:rule10


if ((/^subject: *x/))
{
    echo "bounce"
    EXITCODE=77
    exit
}

##Op:islargerthan
##Header:
##Value:100000
##Folder:*bounce
##From:
##Name:rule11


if (($SIZE > 100000))
{
    echo "bounce"
    EXITCODE=77
    exit
}

##Op:islargerthan
##Header:
##Value:100000
##Folder:*bounce
##From:
##DoesNot
##Name:rule12


if (!($SIZE > 100000))
{
    echo "bounce"
    EXITCODE=77
    exit
}

##Op:islargerthan
##Header:
##Value:0
##Folder:+dummy dsn=1 days=7
##From:
##Name:ruleauto1


if (($SIZE > 0))
{
    AUTOREPLYFROM="$FROM"
   `mailbot -A "X-Sender: $FROM" -A "From: $AUTOREPLYFROM" -M "$FROM" -m "Maildir/autoresponses/dummy" -d "Maildir/autoresponses/dummy.dat" -D 7 $SENDMAIL -t -f ""`
    if ($RETURNCODE != 0)
    {
      EXITCODE=$RETURNCODE
      exit
    }
}

##Op:islargerthan
##Header:
##Value:0
##Folder:+dummy2
##From:
##Name:ruleauto2


if (($SIZE > 0))
{
    AUTOREPLYFROM="$FROM"
   `mailbot -A "X-Sender: $FROM" -A "From: $AUTOREPLYFROM" -m "Maildir/autoresponses/dummy2" $SENDMAIL -t -f ""`
    if ($RETURNCODE != 0)
    {
      EXITCODE=$RETURNCODE
      exit
    }
}

##Op:contains
##Header:subjéct
##Value:tést
##Folder:.
##From:
##Name:utf8rulé


if ((/^subjéct:.*tést/))
{
   to "Maildir/."
}

to "Maildir/."
