/[imapfilter]/imapfilter/sample.imapfilterrc
ViewVC logotype

Contents of /imapfilter/sample.imapfilterrc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations)
Fri Oct 5 13:19:56 2001 UTC (22 years, 5 months ago) by lefcha
Branch: MAIN
CVS Tags: release-0_6_2
Branch point for: release-0_6_2-patches
Changes since 1.9: +9 -1 lines
One more filter example.

1 ###########
2 # Options #
3 ###########
4 #
5 # Some program options, such as log file.
6 #
7 logfile = /home/user/.imapfilter_log
8
9
10 ##########################
11 # Accounts and mailboxes #
12 ##########################
13 #
14 # Each account has a number of folders/mailboxes which are grouped under
15 # an alias name. Folders belong to the last preceding account. A mailbox
16 # can belong to many mailbox groups.
17 #
18
19 #
20 # Connects to "imap1.mail.server" at port 143, as "user1" and
21 # using password "secret1".
22 #
23 # Mailboxes that exist at "imap1.mail.server" include: "INBOX", "woody",
24 # "linux-mailist", etc. and are grouped in various ways.
25 #
26 account user1:secret1@imap1.mail.server:143
27 folder inbox1 INBOX
28 folder friends Woody,Buzz
29 folder bsd bsd-mailist
30 folder linux linux-mailist
31 folder lists linux-mailist,bsd-mailist
32 folder all INBOX,woody,buzz,linux-mailist,bsd-mailist
33
34 #
35 # Another account and it's folder settings.
36 #
37 account user2:secret2@imap2.mail.server
38 folder inbox2 INBOX
39 folder games nethack,koules
40
41
42 ###########
43 # Filters #
44 ###########
45 #
46 # Filters are completely independent from any account or folder settings.
47 # The mask command may be ommited. If no masks are declared inside
48 # a filter entry, then all messages are matched.
49 #
50
51 #
52 # A possible anti-spam filter to get rid of unwanted messages.
53 #
54 # The "or" flag in the arguments of the filter command makes the
55 # filter masks work like this (in pseudocode):
56 # if (from ... )
57 # or if (from ...)
58 # or if (subject ...)
59 # then delete
60 #
61 filter spam or
62 mask from marketing@company.junk
63 mask from advertising@annoying.promotion
64 mask subject "new great products"
65 action delete
66
67 #
68 # Another filter useful for sorting of mail.
69 #
70 # This one moves messages with the specified "sender" header to
71 # the mailbox bsd-mailist.
72 #
73 # When no "or" or "and" flag is specified for a filter the default
74 # "and" is used.
75 #
76 filter bsdlist or
77 header sender bsd-mailist@mailist.bsd
78 action move bsd-mailist
79
80 #
81 # Messages can be copied to a folder, eg. for archive purposes.
82 #
83 # This filter copies all messages with the "[patch]" word in
84 # the subject header and smaller that 50000 bytes, to a mailbox
85 # named "patches" that may or may not exist (in the latter case
86 # it will be automatically created). Also, displays their "From" and
87 # "Subject" headers.
88 #
89 filter patch and
90 subject [patch]
91 smaller 50000
92 action copy patches from,subject
93
94 #
95 # One can also display some of the headers of messages that match
96 # a filter.
97 #
98 # This filter displays and/or writes to logfile the "From", "Subject"
99 # and "Date" headers of recent, unread messages, that come from
100 # "tux@penguin.land" or "beastie@daemon.land" but not with a subject
101 # containing the phrase "all work and no play".
102 #
103 # Note that the "recent and unseen" functionality can also be
104 # accomplished with "new" or even "not old".
105 #
106 filter display
107 recent
108 unseen
109 from tux@penguin.land
110 or from beastie@daemon.land
111 not subject "all work and no play"
112 action list from,subject,date
113
114
115 #
116 # And here is a filter that matches all messages except those that have
117 # an explicit "To" header, a really strict filter.
118 #
119 filter strict
120 not to "name surname <email@address>"
121 action delete
122
123
124 ########
125 # Jobs #
126 ########
127 #
128 # Last, there is the definition of the jobs where user combines
129 # folders and filters _already_ defined, and specifies which filters
130 # should be applied to which folders.
131 #
132
133 job spam,display inbox1,inbox2
134 job patch lists
135 job bsdlist inbox1

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26