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

Annotation of /imapfilter/sample.imapfilterrc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (hide 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 lefcha 1.9 ###########
2     # Options #
3     ###########
4     #
5     # Some program options, such as log file.
6     #
7     logfile = /home/user/.imapfilter_log
8    
9    
10 lefcha 1.7 ##########################
11     # Accounts and mailboxes #
12     ##########################
13 lefcha 1.8 #
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 lefcha 1.7
19     #
20     # Connects to "imap1.mail.server" at port 143, as "user1" and
21     # using password "secret1".
22     #
23 lefcha 1.8 # Mailboxes that exist at "imap1.mail.server" include: "INBOX", "woody",
24     # "linux-mailist", etc. and are grouped in various ways.
25     #
26 lefcha 1.7 account user1:secret1@imap1.mail.server:143
27 lefcha 1.8 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 lefcha 1.7
34     #
35     # Another account and it's folder settings.
36     #
37     account user2:secret2@imap2.mail.server
38 lefcha 1.8 folder inbox2 INBOX
39     folder games nethack,koules
40 lefcha 1.7
41    
42     ###########
43     # Filters #
44     ###########
45     #
46 lefcha 1.8 # 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 lefcha 1.7 #
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 lefcha 1.8 mask from marketing@company.junk
63     mask from advertising@annoying.promotion
64 lefcha 1.9 mask subject "new great products"
65 lefcha 1.7 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 lefcha 1.8 header sender bsd-mailist@mailist.bsd
78 lefcha 1.7 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 lefcha 1.9 # it will be automatically created). Also, displays their "From" and
87     # "Subject" headers.
88 lefcha 1.7 #
89     filter patch and
90 lefcha 1.8 subject [patch]
91     smaller 50000
92 lefcha 1.9 action copy patches from,subject
93 lefcha 1.7
94     #
95     # One can also display some of the headers of messages that match
96     # a filter.
97     #
98 lefcha 1.9 # 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 lefcha 1.7 #
103     # Note that the "recent and unseen" functionality can also be
104     # accomplished with "new" or even "not old".
105     #
106     filter display
107 lefcha 1.8 recent
108     unseen
109     from tux@penguin.land
110     or from beastie@daemon.land
111 lefcha 1.9 not subject "all work and no play"
112 lefcha 1.7 action list from,subject,date
113 lefcha 1.10
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 lefcha 1.7
123    
124     ########
125     # Jobs #
126     ########
127     #
128 lefcha 1.8 # Last, there is the definition of the jobs where user combines
129 lefcha 1.7 # folders and filters _already_ defined, and specifies which filters
130     # should be applied to which folders.
131     #
132 lefcha 1.8
133 lefcha 1.7 job spam,display inbox1,inbox2
134 lefcha 1.8 job patch lists
135 lefcha 1.7 job bsdlist inbox1

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26