# -*- text -*-

# ~/.tmda/filters/incoming 
#
# Example TMDA incoming filter file; controls how incoming messages
# are disposed of.  The first match wins.  Deliveries are logged to
# ~/.tmda/incoming.log
#
# References:
# http://wiki.tmda.net/FilterSpecification
# http://wiki.tmda.net/FilterSources
# http://wiki.tmda.net/TmdaFaq

#####################
# whitelisted senders
#####################

# Accept mail from whitelisted senders and domains first.
from-file ~/.tmda/lists/whitelist ok
from-file ~/.tmda/lists/confirmed ok

#####################
# blacklisted senders
#####################

# Uncomment if you have the hashcash tool installed and want to accept
# mail containing valid hashcash stamps.  For more information, see
# http://wiki.tmda.net/TmdaHashCashHowto
#pipe-headers "hashcash -c -y -X -b20 -r you@yourdomain.dom" ok

# Discard mail from blacklisted senders and domains.
from-file ~/.tmda/lists/blacklist drop

###################
# content filtering
###################

# Accept (don't challenge) replies to messages I've sent.  See TMDA
# FAQ 5.5 for an explanation of this technique.  Uncomment one or more
# of these 'headers' pairs depending on which mailer you use.
#
# Mozilla Thunderbird
#headers '^In-Reply-To:(.|\n)*<4.*@.*>' ok
#headers '^References:(.|\n)*<4.*@.*>' ok
# Microsoft Entourage
#headers '^In-Reply-To:(.|\n)*<.*\%you@yourhost\.com>' ok
#headers '^References:(.|\n)*<.*\%you@yourhost\.com>' ok
# tmda-sendmail / tmda-ofmipd
#headers '^In-Reply-To:(.|\n)*<.*\.TMDA@.*>' ok
#headers '^References:(.|\n)*<.*\.TMDA@.*>' ok

# Accept mail containing the Habeas SWE headers (http://www.habeas.com/)
headers "^X-Habeas-SWE-3.*like Habeas SWE \(tm\)" ok

# SPF has marked the message as forged.  Do not confirm it.
headers "Received-SPF: fail" hold 

# Hold all messages marked by SpamAssassin that score above level 8.
# See http://wiki.tmda.net/SpamAssassin for more examples.
headers "X-Spam-Level: \*\*\*\*\*\*\*\*" hold

# Hold messages with Microsoft executable attachments, which may be
# virus/worm-infected.
body "filename\=.+\.(pif|scr|exe|bat|com|cmd|vbs|js|rar)" hold

#####################
# default disposition
#####################

# Mail that didn't match one of the rules above will be challenged.

from * confirm

