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
0
votes
1 answer

Why is my script is not consistently detecting contents in email bodies?

I've setup a sieve filter which invokes a Python script when it detects a postal service email about package deliveries. The sieve filter works fine and invokes the Python script reliably. However, the Python script does not reliably do its work.…
Louis
  • 146,715
  • 28
  • 274
  • 320
0
votes
1 answer

failed to stat sieve storage path: nonsense path

I have a mail server with postfix and dovecot installed. Postfix is configured to use dovecot's lmtp service in order to apply some sieve scripts. mailbox_transport = lmtp:unix:private/dovecot-lmtp And this seems to work so far. But when my server…
Ilka
  • 50
  • 8
0
votes
1 answer

Dovecot Sieve and :output variable for execute

I'm trying to get blow Sieve filter to work require ["fileinto", "imap4flags", "mailbox", "body", "envelope", "vnd.dovecot.pipe", "variables", "vnd.dovecot.execute"]; if envelope :matches "To" "*@*" { set "recipient" "${0}"; set "user" "${1}"; …
JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
0
votes
3 answers

Add date header to incoming email with Sieve

I'm looking for a way to do in Sieve something that I've been doing in Procmail for years, which is to insert an unambiguous date header in incoming messages that makes it clear to me -- independent of buried "received" headers from possibly…
CraigH
  • 165
  • 2
  • 12
0
votes
1 answer

Is there a good library for handling sieve mail filters in python?

I'm currently writing a module for a customer to handle a user's sieve mail filter files. I am required to use python and much to my disappointment I could not find a nice library/package for handling sieve filters. Question is: Is there something…
Florian
  • 3,366
  • 1
  • 29
  • 35
0
votes
1 answer

Sieve and MIME extension

I have a sieve filter which looks like: require ["mime", "imap4flags"]; if header :mime :contenttype "Content-Type" "message/upload-notification" { setflag "\\Seen"; } when I try to complie it to a binary version for Dovecot I'm receiving an…
JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
0
votes
1 answer

Saving mail into specific folder with Sieve

According to documentations, if header :contains "To" "user@domain.net" { fileinto "archive/user_domain_net"; stop; } this would work. The intention would be saving a mail into a hardcoded path if the mail comes to a specific hardcoded…
Exec
  • 407
  • 6
  • 18
0
votes
1 answer

Sieve not filtering email

I setup Postfix with Spamassassin and Dovecot with Sieve. Spamassassin will tag the email as spam. I am trying to get Sieve to move mail tagged as "Spam" by SpamAssassin into the Junk folder. However, it is not doing so. I have no idea what I am…
Farhan Yusufzai
  • 297
  • 6
  • 23
0
votes
2 answers

sendmail lda parameter for full recipients address

Using this: define('LOCAL_MAILER_ARGS', 'procmail -t -Yo -a $h -d $u') in my sendmail mc gives a procmail LOGNAME like user instead of user@domain.com using define('LOCAL_MAILER_ARGS', 'procmail -t -Yo -a $h -d $u@$h') gives…
Jimmy Koerting
  • 1,231
  • 1
  • 14
  • 27
0
votes
1 answer

How useful is James jSieve?

I am looking to create some filters of different complexity for Apache James. My question is: How useful is James jSieve? What are benefits of using it? How current/actively-developed it is? I already looked at the standard matcher & mailets. I…
Daniil Shevelev
  • 11,739
  • 12
  • 50
  • 73
0
votes
1 answer

How can I link against the PostgreSQL libs when I compile Cyrus's seiveshell?

I maintain a software stack consisting of Perl and Cyrus IMAP among other things. Perl seems to be working fine and Cyrus cyradm (a perl script) works fine too. However, sieveshell will not execute and reason for asking for help here. When I run…
Eric
  • 1,697
  • 5
  • 29
  • 39
1 2
3