Difference between revisions of "Email sieve"

From Cncz
Jump to: navigation, search
([Voorbeelden van Sieve-scripts][Examples of Sieve-scripts])
Line 2: Line 2:
  
 
[nl]
 
[nl]
Wanneer men op de IMAP-server <tt>post.science.ru.nl</tt> mail die op de server binnenkomt automatisch in mappen wil laten sorteren of op een speciale manier filteren, zoals men op oudere mailservers met een bestand <tt>.procmailrc</tt> in de homedirectory kon, dan kan men dat met behulp van "Sieve". <br /> De Sieve taal staat beschreven in [http://www.ietf.org/rfc/rfc3028.txt?number=3028 RFC3028]. <br /> Wanneer men een Sieve-script heeft geschreven, kan men dat op de volgende manier actief maken:
+
Wanneer men op de IMAP-server <tt>post.science.ru.nl</tt> mail die op de server binnenkomt automatisch in mappen wil laten sorteren of op een speciale manier filteren, zoals men op oudere mailservers met een bestand <tt>.procmailrc</tt> in de homedirectory kon, dan kan men dat met behulp van "Sieve". <br /> De Sieve taal staat beschreven in [http://www.ietf.org/rfc/rfc3028.txt?number=3028 RFC3028]. <br /> Een sievescript kan met een mailprogramma dat sieve ondersteund op de mailserver worden gezet. Dat kan bijvoorbeeld met KMail of met Thunderbird met de sieve addon [http://sieve.mozdev.org/].
 
[/nl]
 
[/nl]
 
[en]
 
[en]
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 <tt>post.science.ru.nl</tt> as incoming mailserver. The Sieve language is described in [http://www.ietf.org/rfc/rfc3028.txt?number=3028 RFC3028]. Below are instructions to activate a Sieve-script:
+
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 <tt>post.science.ru.nl</tt> as incoming mailserver. The Sieve language is described in [http://www.ietf.org/rfc/rfc3028.txt?number=3028 RFC3028]. To put the sieve script on the mail server and activate it, use a mail program which supports sieve, e.g. KMail or Thunderbird with the sieve addon [http://sieve.mozdev.org/].
[/en]
 
 
 
* Log in [op][to] "solo.science.ru.nl" ([of][or] "solost.science.ru.nl" [voor studenten][for students])
 
* [Tik][Type]:
 
 
 
        /usr/local/cyrus-imapd/bin/sieveshell post.science.ru.nl
 
 
 
[en geef je wachtwoord][and give your password].
 
 
 
* [Als je daarna een '?' tikt, zie je wat je kunt doen][If you type a '?', you see what to do]:
 
 
 
        Usage:
 
          sieveshell [-u username] [-a authname] [-r realm] &lt;server&gt;
 
        help            - this screen
 
        list            - list scripts on server
 
        put &lt;filename&gt; [&lt;target name&gt;]
 
                          - upload script to server
 
        get &lt;name&gt; [&lt;filename&gt;]
 
                          - get script. if no filename display to stdout
 
        delete &lt;name&gt;    - delete script
 
        activate &lt;name&gt;  - set a script as the active script
 
        deactivate      - deactivate all scripts
 
        quit            - quit
 
 
 
[nl]
 
Dat is een <code>ftp</code>-achtig interface om scripts te bekijken (<code>get</code>) of te uploaden (<code>put</code>). Je moet een beetje voorzichtig zijn met het aanpassen van zo'n script, omdat je eenvoudig mail die aan je gestuurd wordt daarmee kwijt kunt raken.
 
[/nl]
 
[en]
 
This is an <code>ftp</code>-like interface to view (<code>get</code>) or upload (<code>put</code>) scripts. One has to be a bit careful changing such a script, because it is quite easy to lose new mail this way.
 
[/en]
 
<br />
 
  
 
=== [Voorbeelden van Sieve-scripts][Examples of Sieve-scripts] ===
 
=== [Voorbeelden van Sieve-scripts][Examples of Sieve-scripts] ===

Revision as of 11:41, 26 January 2010

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. To put the sieve script on the mail server and activate it, use a mail program which supports sieve, e.g. KMail or Thunderbird with the sieve addon [2].

Examples of Sieve-scripts

[en]

  • 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;
}
if address :is ["From", "To"] [
              "",
              ""
        ]
{
        fileinto "INBOX.Symposium2008";
        stop; 
}
include "spam";
include "vacation";

If one wants to redirect all mail that remains after our spamfilter has done its job, one has to add after the include "spam"; line:

redirect "";