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:

111 questions
0
votes
1 answer

Where sieve file must be located if dovecot runs with virtual_mailbox_maps

I have postfix + dovecot install that uses virtual_mailbox_maps I want to do sieve for specific users. where I should put the sieve file, since there are no user directories? In dovecot configuration I have this: plugin { sieve_extensions …
Nick
  • 826
  • 2
  • 15
  • 42
0
votes
1 answer

how to lint sieve scripts in a programmatic way

how can I lint sieve scripts in a programmatic way? I am looking for something to integrate in a sieve editor I have not found any reference in the sieve documentation
Max Muster
  • 337
  • 2
  • 6
  • 27
0
votes
1 answer

Reject mail based on FROM domain

I'm wondering if it's possible to setup filter in sieve to catch the FROM domain and match that with the TO recipient mailbox name. Usage is to filter unwanted emails when companies sell/share my personal information. ex. This should be…
plejon
  • 1
  • 1
0
votes
2 answers

Sieve: Filter Rules

I want to implement a rule as follows: If "To" comprises only addresses having "*@example.com" -> discard Otherwise -> keep In other words: If "To" comprises at least one address different to "*@example.com" -> keep Otherwise -> discard The…
Ralph
  • 1
0
votes
1 answer

Dovecot sieve concatenate heqders

Setup postfix forwards all mails to an archive@domain user via always_bcc, postfix saves all the RCPT TO in X-Envelope-To headers to perserve the bcc recipients, postfix deletes X-Envelope-To for smtp transfers out for privacy reasons, postfix…
0
votes
1 answer

Sievie for outgoing mail - dovecot

I need to make a filter for outgoing mail. To copy messages if "to" contains the given e-mail address.I have: # rule:[Copy to slack] if address :contains "to" "test@example.com" { redirect :copy "XXXXXXXXXX@example.slack.com"; } and i try #…
onev
  • 1
  • 1
0
votes
2 answers

Issue with Sieve Filters on postfix?

I was wondering if someone could shed some light on the issue im having, Currently i have a simple postfix server and in front it has a PMG gateway. Because PMG gateway has the spam filters i need to redirect the spam to go to the users junk folder.…
killmasta93
  • 21
  • 1
  • 5
0
votes
1 answer

Dovecot: How can I prevent sieve filter from being applied to some mail users?

We have an emarket@example.com mailbox that receives orders from customers. Postfix redirects such emails to the email addresses of our sales managers, as well as to the special address parser@example.com, which is used by some analytical software.…
yurybx
  • 11
  • 3
0
votes
1 answer

Postfix aliases and duplicate e-mails - with Dovecot

This is actually a follow-up question to this post: Postfix aliases and duplicate e-mails, how to fix? (I don't have enough reputation to comment on that post.) I have setup my Postfix + Dovecot as the first answer suggests - by using a sieve script…
AlesP
  • 1
  • 1
0
votes
1 answer

Why email response comes from: Postmaster

I've created a sieve script that filters for particular words in Subject, drops the body and sends notification to the recipient and sender. Everything works well but the only thing I can't figure out is how to change response email not to be from…
sat
  • 1
  • 1
0
votes
2 answers

How to make sieve-filter use virtual users

sieve-filter -e -W -u user@example.com /path/to/sieve/file.sieve INBOX fails with the error: sieve-filter(root): Fatal: Unknown user The output of doveadm -n is auth_master_user_separator = * auth_mechanisms = PLAIN LOGIN deliver_log_format =…
meles
  • 113
  • 4
0
votes
1 answer

Roundcube filters getting ignored with postfix/dovecot/sieve

I'm having a lot of trouble getting roundcube filters working. I can see the filters in the roundcube web interface and I can see the sieve files in the user's home directory. I can also edit and save the filters. However, the filters are getting…
StevieD
  • 514
  • 8
  • 24
0
votes
1 answer

Dovecot's Sieve filter creates duplicate of incoming email

I'm using Dovecot with Sieve filters. I've got a default filter: sieve_before = /var/lib/dovecot/sieve.d/default.sieve And after that some user's filter: sieve_dir = ~/sieve Problem: Dovecot filters "default.sieve" with original incoming message but…
djlj
  • 1
  • 2
0
votes
1 answer

Sieve filter remove detail part from subaddress

I currently have a sieve filter that looks like the following: require ["variables", "envelope", "fileinto", "vnd.dovecot.filter", "subaddress"]; if envelope :matches "to" "*" { set :lower "my_recipient" "${1}"; filter ".."…
Jacob
  • 210
  • 2
  • 8
-1
votes
1 answer

Postfix + Dovecot + Sieve - CC and BCC redirects won't works

guys! I have a CentOS web server with ISPConfig, this server has been running without any problems for over a year, included with the email service (postfix + dovecot + sieve). However, a new need arose for a client that is sending copies of emails…