Feb 14, 2010
sift is a simple client-side tool for manipulating messages stored upon a remote IMAP server.Using it you can create simple rule-files which allow operations to be conducted against the remote store.A typical use would be to:· Connect to an IMAP server.· Open a remote folder.· Find messages which are new and contain a given string in their subjects.· Mark them as read, and execute a program.This basic usage is demonstrated in the simple rule-file sample distributed with the code.There are two types of rules which sift understands: Those that select messages and those that operate upon them.When reading these rules you must keep in mind how sift works - at all times there is a list of messages which are regarded as "selected". The selection rules reduce that list of selected messages by some criterea, and the operating rules run against them.The selecting rules:· folder:xxxOpen folder xxx, and select all messages. You should replace spaces, if any, with '#'. For example folder:[Google#Mail]/Spam· subject:fooReduce the set of selected messages to those containing the given string in the subject.· from:firstname.lastname@example.orgReduce the set of selected messages to those from the given address.
· status:[new|old]Reduce the set of selected messages to those which are either new, or old.The operating rules are:· deleteDelete all currently selected messages.· move:barMove all selected messages to the folder bar.· mark:[read|unread]Change the new/old flag of the selected messages.· exec:/path/to/scriptExecute the given script once for each message. The message will be passed to the command as STDIN.· execonce:/path/to/scriptSimilar to exec:, but the given script once regardless of the number of selected messages. (There must be at least one message selected; no message bodies are passed to the script.)· dumpA diagnostic rule which will dump some details of each selected message to STDOUT - such as sender, recipient, and subject.What's New in This Release:· This release adds several more primitives for selecting messages, and updates each of the existing selection primitives to allow full Perl regular expressions to be used.· The fetching of messages from the remote IMAP server has been improved to use the local disk as a cache.· This means we may avoid fetching messages multiple times.