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

Annotation of /imapfilter/sample.imapfilterrc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations)
Fri Jul 26 14:40:42 2002 UTC (21 years, 8 months ago) by lefcha
Branch: MAIN
Changes since 1.13: +59 -20 lines
Changed to include rcopy/rmove, flag, etc.

1 lefcha 1.9 ###########
2     # Options #
3     ###########
4     #
5 lefcha 1.12 # Some program options, such as log file and non-response server timeout.
6 lefcha 1.9 #
7 lefcha 1.14 logfile = /home/user/.imapfilter.log
8 lefcha 1.12 set timeout = 120
9 lefcha 1.14 expunge = no
10     subscribe = yes
11 lefcha 1.9
12    
13 lefcha 1.7 ##########################
14     # Accounts and mailboxes #
15     ##########################
16 lefcha 1.8 #
17     # Each account has a number of folders/mailboxes which are grouped under
18     # an alias name. Folders belong to the last preceding account. A mailbox
19     # can belong to many mailbox groups.
20     #
21 lefcha 1.7
22     #
23     # Connects to "imap1.mail.server" at port 143, as "user1" and
24     # using password "secret1".
25     #
26 lefcha 1.14 # Mailboxes that exist at "imap1.mail.server" include: "INBOX",
27     # "bsd-maillist", "linux-maillist", etc. and are grouped in various ways.
28 lefcha 1.8 #
29 lefcha 1.14 account account1 user1:secret1@imap1.mail.server:143
30 lefcha 1.8 folder inbox1 INBOX
31 lefcha 1.14 folder bsd bsd-maillist
32     folder linux linux-maillist
33     folder lists linux-maillist,bsd-maillist
34     folder all INBOX,linux-maillist,bsd-maillist
35 lefcha 1.7
36     #
37     # Another account and it's folder settings.
38     #
39 lefcha 1.11 # It connects to an IMAP mail server using the SSLv3 protocol.
40     #
41 lefcha 1.14 account account2 user2:secret2@imap2.mail.server ssl3
42 lefcha 1.8 folder inbox2 INBOX
43 lefcha 1.13 folder games nethack,koules,"clan bomber"
44 lefcha 1.14 #
45     # A third account which password is intentionally ommited, either because
46     # it will be supplied interactively or because it will be stored securely
47     # using the integrated password editor.
48     #
49     account account3 user3@imap3.mail.server
50     folder inbox3 INBOX
51 lefcha 1.7
52    
53     ###########
54     # Filters #
55     ###########
56     #
57 lefcha 1.8 # Filters are completely independent from any account or folder settings.
58     # The mask command may be ommited. If no masks are declared inside
59     # a filter entry, then all messages are matched.
60 lefcha 1.7 #
61    
62     #
63     # A possible anti-spam filter to get rid of unwanted messages.
64     #
65     # The "or" flag in the arguments of the filter command makes the
66     # filter masks work like this (in pseudocode):
67     # if (from ... )
68     # or if (from ...)
69     # or if (subject ...)
70     # then delete
71     #
72     filter spam or
73 lefcha 1.8 mask from marketing@company.junk
74     mask from advertising@annoying.promotion
75 lefcha 1.9 mask subject "new great products"
76 lefcha 1.7 action delete
77    
78     #
79 lefcha 1.14 # And here is a filter that matches all messages except those that have
80     # an explicit "To" header, a really strict filter.
81     #
82     filter strict
83     not to "name surname <email@address>"
84     action delete
85    
86     #
87 lefcha 1.7 # Another filter useful for sorting of mail.
88     #
89 lefcha 1.11 # This one moves messages with the specified "sender" header and
90 lefcha 1.14 # an internal date newer than 14 days to the mailbox bsd-maillist.
91 lefcha 1.7 #
92     # When no "or" or "and" flag is specified for a filter the default
93     # "and" is used.
94     #
95 lefcha 1.11 filter bsdlist
96 lefcha 1.14 header sender bsd-maillist@maillist.server
97 lefcha 1.11 newer 14
98 lefcha 1.14 action move bsd-maillist
99 lefcha 1.7
100     #
101     # Messages can be copied to a folder, eg. for archive purposes.
102     #
103     # This filter copies all messages with the "[patch]" word in
104     # the subject header and smaller that 50000 bytes, to a mailbox
105     # named "patches" that may or may not exist (in the latter case
106 lefcha 1.9 # it will be automatically created). Also, displays their "From" and
107     # "Subject" headers.
108 lefcha 1.7 #
109     filter patch and
110 lefcha 1.14 subject "[patch]"
111 lefcha 1.8 smaller 50000
112 lefcha 1.9 action copy patches from,subject
113 lefcha 1.7
114     #
115 lefcha 1.14 # One can also just display some of the headers of messages that match
116 lefcha 1.7 # a filter.
117     #
118 lefcha 1.9 # This filter displays and/or writes to logfile the "From", "Subject"
119     # and "Date" headers of recent, unread messages, that come from
120     # "tux@penguin.land" or "beastie@daemon.land" but not with a subject
121     # containing the phrase "all work and no play".
122 lefcha 1.7 #
123     # Note that the "recent and unseen" functionality can also be
124     # accomplished with "new" or even "not old".
125     #
126     filter display
127 lefcha 1.8 recent
128     unseen
129     from tux@penguin.land
130     or from beastie@daemon.land
131 lefcha 1.9 not subject "all work and no play"
132 lefcha 1.7 action list from,subject,date
133 lefcha 1.10
134 lefcha 1.14 #
135     # Messages can be copied between two different accounts, ie. two
136     # different IMAP mail servers.
137     #
138     # This filter copies matching messages to INBOX of "account3".
139     #
140     filter security or
141     from security@security.announcements
142     from security-announce@my.unix.os
143     action rcopy account3 INBOX subject,date
144    
145     #
146     # Likewise, messages can be moved between different accounts.
147     #
148     filter weekly-news
149     from "weekly-news@news.letter"
150     action rmove account3 news
151 lefcha 1.10
152     #
153 lefcha 1.14 # One can set flags of messages. This can be accomplished with the "flag"
154     # keyword. It is possible to add, remove or replace the flags of a message.
155     #
156     # The filter below, adds the "flagged" flag (which is used to mark a message
157     # important) to matching mail.
158 lefcha 1.10 #
159 lefcha 1.14 filter new-release
160     from announce@my.bsd.os
161     or from announce@my.linux.os
162     subject "new release"
163     or body "new release"
164     action flag add flagged
165 lefcha 1.7
166    
167     ########
168     # Jobs #
169     ########
170     #
171 lefcha 1.8 # Last, there is the definition of the jobs where user combines
172 lefcha 1.7 # folders and filters _already_ defined, and specifies which filters
173     # should be applied to which folders.
174     #
175     job spam,display inbox1,inbox2
176 lefcha 1.8 job patch lists
177 lefcha 1.7 job bsdlist inbox1

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26