Questions tagged [sieve]

Sieve is a language for filtering email messages. It can be implemented in mail server or mail client.

Sieve is language that can be used to create filter script for email. It owes its creation to the CMU Cyrus Project, creators of Cyrus IMAP server.

The language was standardized in the RFC 3028 (obsolete version) and replaced by RFC 5228. Several RFCs also published to extends functionality of Sieve. The ManageSieve protocol (defined in RFC 5804) allows users to manage their Sieve scripts on a remote server.

Sieve can be implemented in mail server. Script will be executed during final delivery, when the message is moved to the user-accessible mailbox. Several examples of Server-Based Sieve are:

  • Dovecot (MDA with Pigeonhole project)
  • Exim v4 (MTA)
  • Perdition (proxy server supporting POP3, IMAP)

System administrator can use sieve to implement system wide filtering, for example: to move message to Spam Folder when its spam score exceeds threshold. Every user can be also write their own sieve script.

Sieve can be implemented in mail client too. Scrip will be executed when mail client is fetching/synchronizing email from the server. Several examples of Client-Based Sieve are:

  • Thunderbird desktop mail client (with ManageSieve extension)
  • Squirrelmail Webmail (with Avelsieve plugin)
  • Roundcube Webmail

References:

102 questions
10
votes
2 answers

invoke filtering manually in dovecot+sieve

I've configured dovecot with a sieve filtering (also I've configured roundcube, but this does not matter I think). It's working fine, I've set up some filters. But now I've got a huge unfiltered INBOX folder which I don't want to filter…
Arenim
  • 227
  • 1
  • 3
  • 8
9
votes
3 answers

run sieve on maildir

For my mailserver I have a dovecot, postfix and sieve setup. I have several hundred mails in my maildir and have recently created some sieve rules for sorting them. Unfortunatelly the sieve rules are by design only applied to incoming messages.…
ftiaronsem
  • 278
  • 3
  • 10
6
votes
2 answers

Postfix - blocking by From rather than sender

I have a ton of incoming spam that masquerades as being sent by me, but has a sender at some arbitrary spammer domain. e.g. Return-Path: ... (stuff elided, etc.) Received: from [static-93.0.72.177-ttvi.com.br] (unknown…
Iain Brown
  • 71
  • 4
4
votes
3 answers

Dovecot: deliver reply into same folder as replied-to message

UPDATE (2 sept 2014 13:01): Just to clarify, I'm interested in handling an incoming reply from someone else, so coming in via SMTP. If it is a reply to an email that is already in some mail folder, it should be stored in that folder too. I have a…
dr. Sybren
  • 241
  • 1
  • 5
4
votes
1 answer

How to trigger custom actions in dovecot, when email is moved or deleted?

In my dovecot setup I use virtual folders (not to be confused with virtual users). My goal is to get something like seen in googlemail. I want a folder containing all my messages and also I want to have specific folders for specific mails to sort…
Legy
  • 141
  • 4
4
votes
4 answers

Sieve: filter subject with regex, file into mailbox named match

I am trying to filter mails by subject with a regular expression. The subjects I want to match are read like [git-foo] some more text where foo is the string I want to check for. I end up with the following require ["fileinto", "variables",…
Jan
  • 266
  • 1
  • 3
  • 6
3
votes
2 answers

Debugging spamassassin with postfix

I am trying to setup spamassassin milter on my postfix mail server. SpamAssassin Server version 3.4.1 running on Perl 5.20.2 with SSL support (IO::Socket::SSL 2.019) with zlib support (Compress::Zlib 2.064) Postfix mail_version = 2.11.3 When…
Dany Khalife
  • 209
  • 3
  • 17
3
votes
1 answer

Dovecot Sieve does not run?

I'm quite new to Dovecot but it has worked out for me pretty good so far for me. I run dovecot with postfix and amavis and spamassassin and it works out all fine, mails get tagged as junk, sending, receiving, all fine. Now I wanted to add the sieve…
invalid
  • 31
  • 2
3
votes
1 answer

Dovecot Sieve allows spoofing through LMTP

I have set up Postfix to block spoofing your email (you can only send emails as yourself): smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch I have set up Sieve and ManageSieve on the server. My users can now configure…
Friend of Kim
  • 231
  • 1
  • 4
  • 12
3
votes
1 answer

Postfix: Pass a copy of an email to a script but deliver the original one to mailbox

It's actually quite simple: I want to pass all incoming emails to a PHP-script, but only as a copy, the original email shall still be delivered to the mailbox as usual. I just can't seem to get it working. I've tried the following (1) Created a…
Quasdunk
  • 179
  • 1
  • 3
  • 10
3
votes
2 answers

How define sieve_global_dir in dovecot's sieve-test

I created a few sieve (dovecot implementation) filter scripts and want to test them using sieve-test. All scripts which are using global includes are failing with the following message Error: sieve: include: sieve_global_dir not set for :global…
krissi
  • 3,317
  • 1
  • 18
  • 22
2
votes
1 answer

Is there a possibility to rewrite the recipient_delimiter in postfix

I use email address suffixes to file emails to different folders. For example, me+suffix@example.com would be filed in folder "suffix". This works, but I would also like to allow for "-" as recipient_delimiter. My understanding is that postfix…
user52366
  • 153
  • 7
2
votes
1 answer

Which special characters work in sieve regex?

I have the Roundcube Webmail v. 1.3.1 mail client with managesieve v. 8.7 extension and want to add some regex driven actions for my mail and the only documentation I found on the regex flavour is this document. However I can't find which special…
VaNa
  • 127
  • 5
2
votes
2 answers

regex sieve script not matching

I have a problem on a dovecot2 mail server with a sieve script I write. The script should automatically move mail coming from a mailing list to a folder (by list name, not list id) require ["fileinto", "mailbox", "variables", "regex"]; if exists…
M1k3y
  • 19
  • 4
2
votes
2 answers

Replace characters in a sieve variable

When I register on websites I use their domain in my email, for example serverfault.com@example.com. I'd like to file each domain into a separate IMAP folder using sieve and I've created the script below: if envelope :regex "to" ["^(.*\\.uk)@",…
1
2 3 4 5 6 7