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
1
vote
1 answer

How to avoid 554 error duplicate header

I set up IRedMail on an AWS server, so the mail stack looks something like this: Postfix Dovecot Roundcube Mail sent through Amazon SES I'm trying to forward emails to Gmail using the Managesieve plugin in Roundcube. Forwarded emails get returned…
rationalcarl
  • 11
  • 1
  • 2
1
vote
1 answer

Problematic Mail Sieve rules

I need top classify my incomming emails using this three rules: if the email was send to any @somedomain.tld, then copy that email to "somedomain_tld" if the email was send to any other @*.tld , then copy that email to "others_tlds". (any other =…
1
vote
2 answers

Sieve: put mail to subaddress into folder

Is it possible to write a Sieve rule like if envelope :detail "to" "$x" { fileinto "inbox.$x"; } but for all possible $x? I.e. if the user created a folder inbox.foo I want mail addressed to user+foo@domain to land there automatically. The spec…
pascal
  • 221
  • 1
  • 9
1
vote
1 answer

Sieve Does not Work in Postfix + Dovecot + LMTP + Virtual Mailbox Setting

I am setting up a spam filter on my email server but cannot get sieve to sort the mails. All spams are delivered straight to the inbox despite rules written in .dovecot.sieve. In mail logs Postfix reports that spams (marked with X-Spam-Flag in their…
UM-Li
  • 31
  • 4
1
vote
0 answers

Email Sieve to Target emails with a specific pattern in a catchall domain address

I have the following email formats: v2208.hello@yello.com d2311.nope@yello.com y2512.amazon@yello.com b2101.yesyes@yello.com I create them on the fly when I sign up to different sites. I'm having an issue with the regex target for the first 6…
1
vote
2 answers

Postfix + Dovecot, Sieve execution flow and auto reply

I'm using Postfix and Dovecot LMTP on my server. My question is how do I create a silently discarding recipient address and respond auto reply? Also I want to learn Postfix and Dovecot execution control flow. This is part of my Postfix…
jeefo
  • 11
  • 4
1
vote
1 answer

sieve to check if from and reply-to are the same

i'm currently trying to set up a sieve rule to check if From and Reply-to headers are the same. If not reject the email. But i can't seem to get it working. I'm thinking of something like that: if header "from" != "reply-to" { discard; } i have…
1
vote
0 answers

How to replace multiple letters in an variable in Sieve?

I want to use my catch-all-email to put emails in their corresponding folders. So if I were to sign up for twitter I'd use twitter@example.com. Currently I have this script: if address :matches ["To", "Cc"] "*@example.com" { fileinto :create…
1
vote
0 answers

Sieve Script not working on tld's

I have the following sieve script, which is supposed to discard or reject any emails from domains like xxx@xxx .xyz or ....top. However it is not discarding them? require ["reject"]; if address :matches :domain "from" ["*chencoin.com", "*.guru",…
Jules
  • 11
  • 1
1
vote
1 answer

Auto clean mail folder with dovecot/sieve

Can I automatically clean a folder in my mailbox? Let's say I want to automatically delete messages that are older than 3 months. Does dovecot/sieve have this option?
Mr. NoNe
  • 11
  • 2
1
vote
0 answers

Autoreply script not working using Dovecot + Sieve + Vacation on Debian 10

I am trying to configure the vacation sieve script on my Debian10 server, but it does not seem to work (it does not send an autoreply when receiving mail). I didn't really understand how sieve treats the paths to the scripts, so I would really…
1
vote
1 answer

how can i run sieve on a cyrus-imap folder?

I have a sieve script which I would like to run on a folder in my cyrus imap setup. The script is already working fine processing newly incoming mail, but I have to run it on the old mail archive, too. Is there an easy way to do that? or an easy way…
Steve
0
votes
1 answer

Why does Dovecot LDA create subfolders for address detail?

I recently noticed that my dovecot LDA creates a subfolder in my Maildir for mails that have a details part in the recipient address (local-part+detail@domain). I absolutely cannot find a setting that would cause that. I have set…
mcandril
  • 295
  • 3
  • 13
0
votes
1 answer

Sieve Vacation Extension: Save Out of Office Replies

I have an SMTP + IMAP server on linux and use sieve filtering to provide some useful features. One such feature is out-of-office replies, provided by the following script: require ["fileinto", "vacation", "variables"]; # ignore spam if header…
user233054
0
votes
1 answer

Roundcube filter set by ManagedSieve not being found

Here is my current filter: require ["vacation"]; # rule:[Filter Test] if allof (exists "from") { vacation :days 365 :addresses "newmail@vietfeir.com" :subject "Mailbox disabled" :from "newmail@vietfeir.com" text: The mailbox…
Vietyank
  • 111
  • 2
  • 9