Live data from Hacker News

Sieve: An Email Filtering Language (RFC 5228)

rfc-editor.org

11–20 of 25 posts

Re: Sieve: An Email Filtering Language (RFC 5228)

#11
this was part of cyrus imap from cmu, which iirc was the first big imap server to support server side indexes. (i think they were bdbs, iirc)

believe it or not, but many hugely popular applications from 20+ years ago didn't even implement indexing. in this case if you had too much mail your imap client would just time out.

well through the mid-2000s you even had to use a third party plugin for outlook called "lookout" if you wanted searches to not take minutes.

Re: Sieve: An Email Filtering Language (RFC 5228)

#12

I am Fastmail customer so I have access to their Sieve functionality but decided against it. For me the fundamental limitation is that Sieve looks at email only once, when email arrives. I wanted to do the things like: archive email after 3 days being in my inbox, or older than my most recent read email (which would mean I scanned the inbox and the summary was enough) etc. I ended up implementing a Python script that…

Yeah, "keep sales newsletters for two weeks, then delete forever" has been a thing I've wanted for a long time. Nothing seems to make that easy.

I've been leaning towards local processing on an mbox folder... that would also let me build up multiple Bayesian filters to try categorizing my other mail - why does almost everyone only auto-categorize spam? Google kinda broke out of that with their "social" and "important" semi-categories, but it'd be pretty easy to build in local clients, yet I've never seen it.

Re: Sieve: An Email Filtering Language (RFC 5228)

#13
I always want to have a programmable mailserver, but not just for filtering. I hope it can also do things like calling API then react according to the respond etc. It's like a eBPF program but for mailservers.

I'm not sure Sieve is a language that enables such usage. I know maybe it's a domain-specific language, but since it's a language capable of programming the server, I would rather expect more from it than "it's just yet another way to configure your mail filter".

Re: Sieve: An Email Filtering Language (RFC 5228)

#14
post #7

Fastmail supports Sieve rules which is really nice because I can do all my filtering server-side https://www.fastmail.help/hc/en-us/articles/360060591373-How...

Except Sieve rules in Fastmail either work or do not, and it is non-deterministic. A few notoriously persistent problems I have been facing with them for years:

– A notorious spammer that has been spamming me for over a decade that the Fastmail spam filter does not trap[*]. They are easy to screen out via Sieve rules using the "From" header. Except, for 1 out 5 spam emails from them the Sieve rules do not fire, and the spam gets into the inbox.

– Simple email filing into different folders using From/Subject headers. It mostly works except for just a handful senders whose emails Fastmail Sieve do not fire upon no matter how I modify them. They just. do. not. work. I am talking about the most basic From/Subject filing rules.

[*] Spam filtering in Fastmail has been another pet peeve of mine. It is average at best, and mediocre on average. Some spam emails that slip through need to be sent into the spam folder (that has the training enabled) for more than 10x times before*

Re: Sieve: An Email Filtering Language (RFC 5228)

#15
post #14
post #7

Fastmail supports Sieve rules which is really nice because I can do all my filtering server-side https://www.fastmail.help/hc/en-us/articles/360060591373-How...

Except Sieve rules in Fastmail either work or do not, and it is non-deterministic. A few notoriously persistent problems I have been facing with them for years: – A notorious spammer that has been spamming me for over a decade that the Fastmail spam filter does not trap[*]. They are easy to screen out via Sieve rules using the "From" header. Except, for 1 out 5 spam emails from them the Sieve rules do not fire, and t…

(I work for Fastmail). That sounds very surprising. Please email support@fastmail.com with the details and we'll be happy to look into it for you. I don't believe we've ever had an instance of Sieve not working correctly. (We have had plenty of reports that boiled down to people making errors in their Sieve scripts; we recommend most people use our UI instead to make their rules, to allow you to preview results and help ensure the syntax is correct.)

Re: Sieve: An Email Filtering Language (RFC 5228)

#16
I use procmail, fetchmail and nmh via mh-e. Never used imap and the only email service account I have is with lavabit. Each email is one file so the only filtering is which folder the file goes to. Procmail does that and mairix finds them. I just have to write and read, maybe answer or delete.

Re: Sieve: An Email Filtering Language (RFC 5228)

#18

I am Fastmail customer so I have access to their Sieve functionality but decided against it. For me the fundamental limitation is that Sieve looks at email only once, when email arrives. I wanted to do the things like: archive email after 3 days being in my inbox, or older than my most recent read email (which would mean I scanned the inbox and the summary was enough) etc. I ended up implementing a Python script that…

I think there is an IMAP extension that runs Sieve scripts on IMAP actions (like when you move a message to a mailbox). Probably does not help with the use cases you mention though...

Re: Sieve: An Email Filtering Language (RFC 5228)

#19
post #11

this was part of cyrus imap from cmu, which iirc was the first big imap server to support server side indexes. (i think they were bdbs, iirc) believe it or not, but many hugely popular applications from 20+ years ago didn't even implement indexing. in this case if you had too much mail your imap client would just time out. well through the mid-2000s you even had to use a third party plugin for outlook called "lookout…

FWIW they were not Berkley DBs. IIRC the only db was the duplicate suppression feature.

Folders (mailboxes in proper IMAP lingo) had hand-built indexes. Good stuff. Credit to jgm, the original author.

Re: Sieve: An Email Filtering Language (RFC 5228)

#20

I don’t know what I would do without sieve, I use it to manage my mailing list subscriptions, eg move to folders, mark emails from specific chatty users as read, etc. It automates a lot of manual cruft and I’m endlessly thankful for it. I do wish it was more widely supported, and I try to do my part to encourage adoption (I maintain several sieve related packages for Arch Linux).

This is very gratifying to read. I had a lot to do with the original spec, and I'm glad you find it useful.
Post reply on HN