1 |
# Accounts' settings |
########################## |
2 |
SERVER = imap1.mail.server |
# Accounts and mailboxes # |
3 |
USERNAME = user1 |
########################## |
4 |
PASSWORD = secret1 |
|
5 |
|
# |
6 |
SERVER = imap2.mail.server |
# Connects to "imap1.mail.server" at port 143, as "user1" and |
7 |
PASSWORD = secret2 |
# using password "secret1". |
8 |
USERNAME = user2 |
# |
9 |
|
account user1:secret1@imap1.mail.server:143 |
10 |
# Filters |
|
11 |
DENY = FROM penguin@that.really.cold.place |
# |
12 |
DENY = SUBJECT: daemons run faster than penguins |
# Several groups of mailboxes that are part of the last |
13 |
DENY = SUBJECT penguins fly higher than daemons |
# preceding account. In other words all these folders are |
14 |
DENY = Reply-To: daemon@that.really.hot.place |
# located at "imap1.mail.server", as part of the "user1" user |
15 |
ALLOW = FROM: tux |
# account. |
16 |
ALLOW = TO beastie |
# |
17 |
|
# The same mailbox can belong to many mailbox groups. |
18 |
# Size limits |
# |
19 |
DENY_LIMIT = 20000 |
folder inbox1 INBOX |
20 |
ALLOW_LIMIT = 100000 |
folder friends Woody,Buzz |
21 |
|
folder bsd bsd-mailist |
22 |
# Other settings |
folder linux linux-mailist |
23 |
LOGFILE = /home/user/.imapfilter_log |
folder lists linux-mailist,bsd-mailist |
24 |
UNSEEN_ONLY = yes |
folder all INBOX,woody,buzz,linux-mailist,bsd-mailist |
25 |
|
|
26 |
|
# |
27 |
|
# Another account and it's folder settings. |
28 |
|
# |
29 |
|
account user2:secret2@imap2.mail.server |
30 |
|
folder inbox2 INBOX |
31 |
|
folder games nethack,koules |
32 |
|
|
33 |
|
|
34 |
|
########### |
35 |
|
# Filters # |
36 |
|
########### |
37 |
|
|
38 |
|
# |
39 |
|
# Filters are completely independent from any account or |
40 |
|
# folder settings. Also, the mask command may be ommited. |
41 |
|
# |
42 |
|
|
43 |
|
# |
44 |
|
# A possible anti-spam filter to get rid of unwanted messages. |
45 |
|
# |
46 |
|
# The "or" flag in the arguments of the filter command makes the |
47 |
|
# filter masks work like this (in pseudocode): |
48 |
|
# if (from ... ) |
49 |
|
# or if (from ...) |
50 |
|
# or if (subject ...) |
51 |
|
# then delete |
52 |
|
# |
53 |
|
filter spam or |
54 |
|
mask from marketing@company.junk |
55 |
|
mask from advertising@annoying.promotion |
56 |
|
mask subject new great products |
57 |
|
action delete |
58 |
|
|
59 |
|
# |
60 |
|
# Another filter useful for sorting of mail. |
61 |
|
# |
62 |
|
# This one moves messages with the specified "sender" header to |
63 |
|
# the mailbox bsd-mailist. |
64 |
|
# |
65 |
|
# When no "or" or "and" flag is specified for a filter the default |
66 |
|
# "and" is used. |
67 |
|
# |
68 |
|
filter bsdlist or |
69 |
|
header sender bsd-mailist@mailist.bsd |
70 |
|
action move bsd-mailist |
71 |
|
|
72 |
|
# |
73 |
|
# Messages can be copied to a folder, eg. for archive purposes. |
74 |
|
# |
75 |
|
# This filter copies all messages with the "[patch]" word in |
76 |
|
# the subject header and smaller that 50000 bytes, to a mailbox |
77 |
|
# named "patches" that may or may not exist (in the latter case |
78 |
|
# it will be automatically created). |
79 |
|
# |
80 |
|
filter patch and |
81 |
|
subject [patch] |
82 |
|
smaller 50000 |
83 |
|
action copy patches |
84 |
|
|
85 |
|
# |
86 |
|
# One can also display some of the headers of messages that match |
87 |
|
# a filter. |
88 |
|
# |
89 |
|
# This filter prints the "From", "Subject" and "Date headers of |
90 |
|
# recent, unread messages, that come from "tux@penguin.land" or |
91 |
|
# "beastie@daemon.land" but not with a subject containing the |
92 |
|
# phrase "all work and no play". |
93 |
|
# |
94 |
|
# Note that the "recent and unseen" functionality can also be |
95 |
|
# accomplished with "new" or even "not old". |
96 |
|
# |
97 |
|
filter display |
98 |
|
recent |
99 |
|
unseen |
100 |
|
from tux@penguin.land |
101 |
|
or from beastie@daemon.land |
102 |
|
not subject all work and no play |
103 |
|
action list from,subject,date |
104 |
|
|
105 |
|
|
106 |
|
######## |
107 |
|
# Jobs # |
108 |
|
######## |
109 |
|
|
110 |
|
# |
111 |
|
# Last there is the definition of the jobs where user combines |
112 |
|
# folders and filters _already_ defined, and specifies which filters |
113 |
|
# should be applied to which folders. |
114 |
|
# |
115 |
|
job spam,display inbox1,inbox2 |
116 |
|
job patches lists |
117 |
|
job bsdlist inbox1 |