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

Diff of /imapfilter/sample.imapfilterrc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by lefcha, Fri Aug 1 12:28:47 2003 UTC revision 1.17.2.1 by lefcha, Sun Feb 8 21:37:58 2004 UTC
# Line 65  account account3 user3@imap3.mail.server Line 65  account account3 user3@imap3.mail.server
65  #  #
66  # The "or" flag in the arguments of the filter command makes the filter masks  # The "or" flag in the arguments of the filter command makes the filter masks
67  # work like this (in pseudocode):  # work like this (in pseudocode):
68    #
69  #   if (from ...)  #   if (from ...)
70  #   or if (from ...)  #   or if (from ...)
71  #   or if (subject ...)  #   or if (subject ...)
# Line 78  action delete Line 79  action delete
79    
80  #  #
81  # And here is a filter that matches all messages except those that have an  # And here is a filter that matches all messages except those that have an
82  # explicit "To" header, a really strict filter.  # explicit "To" or "Cc" header or come from a friend's specific mail address.
83    #
84    # The "and" flag in the arguments of the filter command makes the filter masks
85    # work like this (in pseudocode):
86  #  #
87  filter strict  #   if (not to ...)
88    not to "name surname <email@address>"  #   and (not cc ...)
89    #   and (not from ...)
90    #   then delete
91    #
92    filter strict and
93      mask not to "name surname <email@address>"
94      mask not cc "name surname <email@address>"
95      mask not from friend@address
96  action delete  action delete
97    
98  #  #
# Line 101  action move bsd-maillist Line 112  action move bsd-maillist
112  #  #
113  # Messages can be copied to a folder, eg. for archive purposes.  # Messages can be copied to a folder, eg. for archive purposes.
114  #  #
115  # This filter copies all messages with the "[patch]" word in  # This filter copies all messages with the "[patch]" word in the subject header
116  # the subject header and smaller that 50000 bytes, to a mailbox  # and smaller that 50000 bytes, to a mailbox named "patches" that may or may
117  # named "patches" that may or may not exist (in the latter case  # not exist (in the latter case it will be automatically created). Also,
118  # it will be automatically created). Also, displays their "From" and  # displays their "From" and "Subject" headers.
 # "Subject" headers.  
119  #  #
120  filter patch and  filter patch
121    subject "[patch]"    subject "[patch]"
122    smaller 50000    smaller 50000
123  action copy patches from,subject  action copy patches from,subject
124    
125  #  #
126  # One can also just display some of the headers of messages that match  # One can also just display some of the headers of messages that match a
127  # a filter.  # filter.
128  #  #
129  # This filter displays and/or writes to logfile the "From", "Subject"  # This filter displays and/or writes to logfile the "From", "Subject" and
130  # and "Date" headers of recent, unread messages, that come from  # "Date" headers of recent, unread messages, that come from "tux@penguin.land"
131  # "tux@penguin.land" or "beastie@daemon.land" but not with a subject  # or "beastie@daemon.land" but not with a subject containing the phrase "all
132  # containing the phrase "all work and no play".  # work and no play".
133  #  #
134  # Note that the "recent and unseen" functionality can also be  # Note that the "recent and unseen" functionality can also be accomplished with
135  # accomplished with "new" or even "not old".  # "new" or even "not old".
136  #  #
137  filter display  filter display
138    recent    recent
# Line 133  filter display Line 143  filter display
143  action list from,subject,date  action list from,subject,date
144    
145  #  #
146  # Messages can be copied between two different accounts, ie. two  # Messages can be copied between two different accounts, ie. two different IMAP
147  # different IMAP mail servers. It must be noted though, that this  # mail servers. It must be noted though, that this requires that the messages
148  # requires that the messages are downloaded from the source mail  # are downloaded from the source mail server and then uploaded to the target
149  # server and then uploaded to the target mail server.  # mail server.
150  #  #
151  # This filter copies matching messages to INBOX of "account3".  # This filter copies matching messages to INBOX of "account3".
152  #  #
# Line 187  filter archive Line 197  filter archive
197    older 60    older 60
198  action move $_-@Y-@m  action move $_-@Y-@m
199    
200    #
201    # And to clarify the combination of and/or flags in filter/mask commands here
202    # is something that might help:
203    #
204    #   if A and (B or C) and (D or E or F) and G then ...
205    #
206    # Can be accomplished with:
207    #
208    #   filter ... and
209    #     A
210    #     B
211    #     or C
212    #     D
213    #     or E
214    #     or F
215    #     G
216    #   action ...
217    #
218    # On the other hand:
219    #
220    #   if A or (B and C) or (D and E and F) or G then ...
221    #
222    # Can be accomplished with:
223    #
224    #   filter ... or
225    #     A
226    #     B
227    #     and C
228    #     D
229    #     and E
230    #     and F
231    #     G
232    #   action ...
233    #
234    
235    
236  ########  ########
237  # Jobs #  # Jobs #
238  ########  ########
239  #  #
240  # Last, there is the definition of the jobs where user combines  # Last, there is the definition of the jobs where user combines folders and
241  # folders and filters _already_ defined, and specifies which filters  # filters _already_ defined, and specifies which filters should be applied to
242  # should be applied to which folders.  # which folders.
243  #  #
244  job spam,display inbox1,inbox2  job spam,display inbox1,inbox2
245  job patch,archive lists  job patch,archive lists

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.17.2.1

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26