Difference between revisions of "Email sieve"
Jump to navigation
Jump to search
Line 63: | Line 63: | ||
If one wants to redirect all mail that remains after our spamfilter has done its job, one has to change the first line to: | If one wants to redirect all mail that remains after our spamfilter has done its job, one has to change the first line to: | ||
[/en] | [/en] | ||
− | require [ "fileinto", "include | + | require [ "fileinto", "include" ]; |
[nl] | [nl] | ||
en dan na de <tt>include "spam";</tt> regel invoegen: | en dan na de <tt>include "spam";</tt> regel invoegen: |
Revision as of 01:17, 7 November 2007
Sieve
If one wants incoming mail to be sorted into folders automatically or to be filtered in some special way, one can use "Sieve" if one has the IMAP-server post.science.ru.nl as incoming mailserver. The Sieve language is described in RFC3028. Below are instructions to activate a Sieve-script:
- Log in to "solo.science.ru.nl" (or "solost.science.ru.nl" for students)
- Type:
/usr/local/cyrus-imapd/bin/sieveshell post.science.ru.nl
and give your password.
- If you type a '?', you see what to do:
Usage: sieveshell [-u username] [-a authname] [-r realm] <server> help - this screen list - list scripts on server put <filename> [<target name>] - upload script to server get <name> [<filename>] - get script. if no filename display to stdout delete <name> - delete script activate <name> - set a script as the active script deactivate - deactivate all scripts quit - quit
This is an ftp
-like interface to view (get
) or upload (put
) scripts. One has to be a bit careful changing such a script, because it is quite easy to lose new mail this way.
Examples of Sieve-scripts
- If some mail should be sorted automatically into an existing folder, one can use a script like:
require [ "fileinto", "include" ]; # # Messages into folders. # if header :contains "X-VirusscanResult" "infected" { fileinto "INBOX.Virus"; stop; } include "spam"; include "vacation";
If one wants to redirect all mail that remains after our spamfilter has done its job, one has to change the first line to:
require [ "fileinto", "include" ];
and then add after the include "spam"; line:
redirect "";