Questions tagged [sieve-language]

Sieve is a programming language that can be used to create filters for email.

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

The language is not tied to any particular operating system or mail architecture. The current version of Sieve's base specification is outlined in RFC 5228, published in January 2008.

Sieve differs from traditional programming languages in that it is highly limited – the base standard has no variables, and no loops, preventing runaway programs and limiting the language to simple filtering operations. Although extensions have been devised to extend the language to include variables and, to a limited degree, loops, the language is still highly restricted, and thus unsuitable for running user-devised programs as part of the mail system.

There are also a significant number of restrictions on the grammar of the language, in order to reduce the complexity of parsing the language, but the language also supports the use of multiple methods for comparing localized strings, and is fully Unicode-aware.

The scripts are transferred to the mail server in a server-dependent way. The ManageSieve protocol (defined in RFC 5804) allows users to manage their Sieve scripts on a remote server. Mail servers with local users may allow the scripts to be stored in e.g. a .sieve file in the users' home directories.

41 questions
1
vote
1 answer

Invalid preceding regular expression given by Sieve

I am attempting to write a filter that matches the regex ^[a-zA-Z0-9_.+-]+@(?:(?:[a-zA-Z0-9-]+\.)?[a-zA-Z]+\.)?(example)\.com$. (I want to capture every email that is from a specific domain). However, it keeps returning the error Invalid preceding…
RHPT
  • 2,560
  • 5
  • 31
  • 43
1
vote
0 answers

How to change recipient of a VACATION autoresponder mail to one in sender's mail header section [Reply-to] purely in Sieve Language?

I need to set an autoresponder that will send a message like "We got You mail! We will get back to you ASAP". The problem is that the sender of customer email is not customer itself (i.e. customer@privatemail.com), but some global mail (i.e.…
Krystian
  • 66
  • 1
  • 9
1
vote
1 answer

What is the correct way to format a Sieve script to include MIME with HTML?

I am trying to implement autoresponders on a server using Dovecot Sieve. I have managed to produce sieve scripts with simple html which works, however, when trying to implement more complex html I am receiving syntax errors. How can I formulate the…
Lee Colarelli
  • 151
  • 2
  • 13
1
vote
1 answer

Dovecot Sieve - How to retrieve part of message as a variable

I need to retrieve some parts of a message which looks like Subject: Test message Message-Id: <2788db2f-b5c3-4b8c-881e-362c3df4f915@server.local> Mime-Version: 1.0 Content-Type: multipart/report;…
JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
1
vote
1 answer

Regex capture groups in Sieve script

I want to put emails that are forwarded to my main mailbox (from another domain) into specific sub-folders. For example: foo@bar goes to INBOX/bar/foo. require ["fileinto", "envelope", "regex", "mailbox"]; if header :regex "delivered-to"…
dblouis
  • 568
  • 1
  • 5
  • 18
1
vote
1 answer

How to use sieve to send HTML email

I am using sieve to send external notification emails about our internal emails. if header :matches "X-Forward-To" "*" { set "forwardTo" "${1}"; set :encodeurl "message" "Message"; notify :from "no-reply@mycompany.com" :importance "1" …
Autumn Leonard
  • 514
  • 8
  • 22
1
vote
2 answers

Dovecot Sieve filters not working

I'm having an issue where dovecot-sieve is not working for me from within Roundcube. In the Roundcube web interface the filters tab is there as well as the vacation tab. I can edit, save, enable, and disable filters just fine, but despite the…
Creibold
  • 23
  • 1
  • 6
1
vote
1 answer

How to use "mime" in vacation or vacation-seconds

I'm using "Pigeonhole Sieve Interpreter" in dovecot(http://wiki2.dovecot.org/Pigeonhole/Sieve), but there is a problem for me! I want to use html code in vacation, I find the mime params. But there is no example about it! I only find a example in…
kevinsir
  • 147
  • 1
  • 8
1
vote
2 answers

Filtering mail through Sieve/Pigeonhole function

Trying to filter mails through a Sieve function. I would like to fetch an e-mail address indicated inside the body of the message, and not in the header. This address is (like the one in the header) after a From: field. After that, a copy of the…
Satch
  • 43
  • 8
1
vote
1 answer

Sieve fails on encoded subjects

I'm trying to set up filter rules for sieve to add a flag and a header to incoming messages with a regex, but sieve fails as soon as there's a german umlaut within the subject. Here's my sieverule require…
baao
  • 71,625
  • 17
  • 143
  • 203
1
vote
1 answer

Where to find old IMAP::Sieve perl module

I am upgrading a server and an existing perl CGI program requires IMAP::Sieve perl module. My problem is that I can't find any reference to it anymore on Internet. Does someone knows if it has been replaced by something else and/or where I could…
Denis BUCHER
  • 310
  • 4
  • 16
0
votes
1 answer

How can the maildir format accomodate flags/UIDs on recent messages?

I am using the maildir (maildir++, actually) email backend format for storing messages on a custom IMAP server. I have a good understanding of the relevant email protocols and maildir format, but this is one question I've had for a while that's been…
InterLinked
  • 1,247
  • 2
  • 18
  • 50
0
votes
0 answers

Can't sieve reply to certain received E-Mails by a predefined E-Mail?

Our hosting provider supports sieve E-Mail rules, and they are perfectly working, e.g., to move received E-Mails based on a Regex. But now, if someone writes to office@mydomain.com, then we must reply with an E-Mail like "Thank you for your E-Mail"…
Tom
  • 357
  • 1
  • 5
  • 18
0
votes
1 answer

How to delete all e-mails from a specific address using sieve-language?

I have made a post about this on reddit. Can someone with a higher understanding of sieve help me do this? I am using ProtonMail. It has been something I tried to do on and off for months.. Filters / sieve filters. Make a filter to check recipient…
Kamil
  • 27
  • 5
0
votes
1 answer

Dovecot Sieve how to set mail raw_text variable

i have filter require ["envelope", "variables", "vnd.dovecot.pipe"]; if envelope :matches "To" "user@example.com" { set "recipient" "${0}"; if header :matches "From" "*" {set "sender" "${0}";} if header :matches "Date" "*" { set "date"…