Difference between revisions of "Email sieve"
Line 58: | Line 58: | ||
[nl] | [nl] | ||
− | Als men de mail door wil sturen die overblijft nadat het spamfilter zijn werk gedaan heeft, kan men na de <tt>include "spam"; | + | Als men de mail door wil sturen die overblijft nadat het spamfilter zijn werk gedaan heeft, kan men na de <tt>include "spam";</tt> regel gebruiken: |
[/nl] | [/nl] | ||
[en] | [en] | ||
If one wants to redirect all mail that remains after our spamfilter has done its job, one can use after the <tt>include "spam";</tt> line: | If one wants to redirect all mail that remains after our spamfilter has done its job, one can use after the <tt>include "spam";</tt> line: | ||
[/en] | [/en] | ||
− | + | redirect "field@example.edu"; | |
− | |||
− | redirect "field@example.edu"; | ||
[[Category:Email]] | [[Category:Email]] |
Revision as of 17:34, 6 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 can use after the include "spam"; line:
redirect "";