Difference between revisions of "Email sieve"

From Cncz
Jump to: navigation, search
m (Sieve)
(Sieve)
 
(3 intermediate revisions by 2 users not shown)
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 /> Een sievescript kan met een mailprogramma dat sieve ondersteunt op de mailserver worden gezet. Dat kan bijvoorbeeld met KMail of met Thunderbird met de [http://sieve.mozdev.org/ sieve addon].
+
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, dan kan men dat met behulp van "Sieve". <br />
 +
Een sievescript kan met een mailprogramma dat sieve ondersteunt, op de mailserver worden gezet. Dit is vrij eenvoudig in [http://roundcube.science.ru.nl Roundcube webmail] via Instellingen -> Filters, maar het kan ook met KMail of met Thunderbird met de [http://sieve.mozdev.org/ sieve addon]. <br />Op lilo4 krijg je met het commando <code>sieve-connect postvak.science.ru.nl</code> een interactieve commandline waar je met het commando ''put'' een sieve script kunt uploaden.<br/>
 +
De Sieve taal staat beschreven in [http://www.ietf.org/rfc/rfc3028.txt?number=3028 RFC3028].
 
[/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]. 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 [http://sieve.mozdev.org/ sieve addon].
+
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. <br />
 +
To put the sieve script on the mail server and activate it, use a mail program which supports sieve.  The filter settings can be managed quite easily in [http://roundcube.science.ru.nl Roundcube webmail] with Settings -> Filters. It is also possible with e.g. KMail or Thunderbird with the [http://sieve.mozdev.org/ sieve addon]. <br /> On lilo4 you get with the command <code>sieve-connect postvak.science.ru.nl</code> an interactive commandline where you can use the command ''put'' to upload a sieve script.<br/>
 +
The Sieve language is described in [http://www.ietf.org/rfc/rfc3028.txt?number=3028 RFC3028].
 
[/en]
 
[/en]
 +
 +
=== [Sieve gebruiken in KMail][Using Sieve in KMail] ===
 +
 +
[nl]Na het toevoegen van een account met behulp van de wizard van KMail (met behulp van de instellingen op [[:Categorie:Email]]) moet nog aan KMail duidelijk gemaakt worden dat de server Sieve ondersteunt. Dit gaat via Settings, Configure KMail, Accounts, Modify, Filtering, Server supports Sieve.
 +
Vervolgens kunnen de Sieve-scripts worden benaderd via Settings, Manage Sieve Scripts.[/nl]
 +
[en]After adding an account via the KMail's wizard (with settings found on [[:Categorie:Email]]), KMail must be told that the server supports Sieve. You can do this via Settings, Configure KMail, Accounts, Modify, Filtering, Server supports Sieve.
 +
After that, Sieve scripts kan be accessed via Settings, Manage Sieve Scripts.[/en]
  
 
=== [Voorbeelden van Sieve-scripts][Examples of Sieve-scripts] ===
 
=== [Voorbeelden van Sieve-scripts][Examples of Sieve-scripts] ===

Latest revision as of 06:42, 27 June 2018

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.
To put the sieve script on the mail server and activate it, use a mail program which supports sieve. The filter settings can be managed quite easily in Roundcube webmail with Settings -> Filters. It is also possible with e.g. KMail or Thunderbird with the sieve addon.
On lilo4 you get with the command sieve-connect postvak.science.ru.nl an interactive commandline where you can use the command put to upload a sieve script.
The Sieve language is described in RFC3028.

Using Sieve in KMail

After adding an account via the KMail's wizard (with settings found on Categorie:Email), KMail must be told that the server supports Sieve. You can do this via Settings, Configure KMail, Accounts, Modify, Filtering, Server supports Sieve. After that, Sieve scripts kan be accessed via Settings, Manage Sieve Scripts.

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;
}
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 "";