122 lines
2.9 KiB
INI
122 lines
2.9 KiB
INI
# Customizing filters
|
|
# You can override the filter
|
|
# or make a new one
|
|
# this filter is in addition to default
|
|
[SpamFilter.0]
|
|
message = meh
|
|
# This one replaces the default
|
|
[SpamFilter]
|
|
message = woah
|
|
|
|
# Cerate a new type
|
|
[ShitFilter(SpamFilter)]
|
|
message = horrible!
|
|
[ShitFilter.0]
|
|
message = whaaa
|
|
|
|
# This is the default filter chain
|
|
[SpamFilter]
|
|
# Add <tag> to mails that are spam.
|
|
# default is spam
|
|
# May use to tag spam as junk or scum or whatever
|
|
# Only single tag supported
|
|
# Emails are spam if X-Spag-Flag is present.
|
|
spam_tag = <tag>
|
|
[KillThreadsFilter]
|
|
# If new msg added to a threat
|
|
# already tagged killed, then add killed
|
|
# tag to this message too. Allows for
|
|
# ignoring all replies to a thread.
|
|
[ListMailsFilter]
|
|
# Looks for the List-Id header.
|
|
# If found, adds a tag lists and a tag
|
|
# lists/list-id
|
|
[ArchiveSentMailsFilter]
|
|
# Extends SentMailsFilter
|
|
# But also removes the new tag, therefore
|
|
# they won't get inbox tag
|
|
[InboxFilter]
|
|
# Removes new tag, adds inbox tag
|
|
# to any msg that isn't killed or spam.
|
|
|
|
|
|
[MeFilter]
|
|
# Add filter tagging mail send directly to
|
|
# any addresses defined in the notmuch config file
|
|
me_tag=to-me
|
|
|
|
[SentMailsFilter]
|
|
# default is empty!
|
|
# add tag to all mail sent from my addresses
|
|
sent_tag = sent
|
|
# Transform to/cc/bcc addresses to tags according
|
|
# to rules.
|
|
# Space separated list of 'user_part@domain_part:tags' pairs.
|
|
# Colon separates address from tags they should have.
|
|
# :tags is optional; if empty, user_part used as tag.
|
|
# Can be single or semicolon separated list.
|
|
# Basically helpful to tag mail that's sent from me,
|
|
# to someone specific.
|
|
# Can be used to easily tag posts sent to mailing lists
|
|
# which don't have the List-Id field yet.
|
|
to_transforms = <rules>
|
|
|
|
# Others
|
|
[FolderNameFilter]
|
|
# Looks at all folders it's in,
|
|
# uses the path and filename as a tag.
|
|
|
|
|
|
|
|
|
|
# notmuch commands:
|
|
|
|
# # immediately archive all messages from "me"
|
|
# notmuch tag -new -- tag:new and from:me@example.com
|
|
|
|
# # delete all messages from a spammer:
|
|
# notmuch tag +deleted -- tag:new and from:spam@spam.com
|
|
|
|
# # tag all message from notmuch mailing list
|
|
# notmuch tag +notmuch -- tag:new and to:notmuch@notmuchmail.org
|
|
|
|
# # finally, retag all "new" messages "inbox" and "unread"
|
|
# notmuch tag +inbox +unread -new -- tag:new
|
|
|
|
# equivalent to:
|
|
[ArchiveSentMailsFilter]
|
|
|
|
[Filter.1]
|
|
message = Delete all messages from spammer
|
|
query = from:spam@spam.com
|
|
tags = +deleted;-new
|
|
|
|
[Filter.2]
|
|
message = Tag all messages from the notmuch mailing list
|
|
query = to:notmuch@notmuchmail.org
|
|
tags = +notmuch
|
|
|
|
[InboxFilter]
|
|
|
|
# More example filters:
|
|
|
|
[Filter.1]
|
|
query = 'sicsa-students@sicsa.ac.uk'
|
|
tags = +sicsa
|
|
message = sicsa
|
|
|
|
[Filter.2]
|
|
query = 'from:foosoc.ed@gmail.com OR from:GT Silber OR from:lizzie.brough@eusa.ed.ac.uk'
|
|
tags = +soc;+foo
|
|
message = foosoc
|
|
|
|
[Filter.3]
|
|
query = 'folder:gmail/G+'
|
|
tags = +G+
|
|
message = gmail spam
|
|
|
|
# skip inbox
|
|
[Filter.6]
|
|
query = 'to:notmuch@notmuchmail.org AND (subject:emacs OR subject:elisp OR "(defun" OR "(setq" OR PATCH)'
|
|
tags = -new
|
|
message = notmuch emacs stuff
|