mail icon indicating copy to clipboard operation
mail copied to clipboard

Filtering of Incoming messages

Open hitam4450 opened this issue 8 years ago • 206 comments

for organizing message it would be very useful to incorporate a filtering mechanism, based on different conditions e.g. specific account, specific sender, Subject, etc., which will be applied to all incoming messages!

regards, hitam4450

Todo

  • [x] Basic sieve support https://github.com/nextcloud/mail/pull/4472
  • [ ] Editor with syntax highlighting
  • [x] UI that can build rules

There is a $800 open bounty on this issue. Add to the bounty at Bountysource.

badge

There is a $800 open bounty on this issue. Add to the bounty at Bountysource.

hitam4450 avatar Sep 05 '16 14:09 hitam4450

This is a nice idea but it is important to draw a clear distinction between the MUA (Mail User Agent) and MDA (Mail Delivery Agent - filtering). MDA solutions on the server side already exist e.g. procmail, maildrop, Dovecot LDA module and others - if you have SSH access to your server, you can set up your rules to do this today. 😄

Using an MDA, your filters are only maintained in one place and you have consistent behavior across all of your devices / email clients. Otherwise you have to maintain the same rulesets across all your devices, and can have confusion / possible race conditions when checking on e.g. the cellphone, then check on webmail and suddenly emails moved around. Finally, when using an MDA rules will execute immediately when mail is delivered - so things like vacation autoresponders, forward-to based on From: etc. do not have to wait for you to login.

It is a good idea, but warrants it's own app I think? Since MDA's can have a lot of accidental complexity - it seems simple at first glance but can get so much more complex, see for example the number of options in the native clients like apple's Mail.app.

zeugmatis avatar Sep 05 '16 19:09 zeugmatis

BTW if this is to be pursued either in Mail app or a separate MDA app for NC, I would like to mention Sieve, which is based on RFC 5228 - already has existing support in many clients/servers/existing API's etc.

zeugmatis avatar Sep 05 '16 19:09 zeugmatis

Of course, a sieve UI is much needed. A library that could be used: http://sieve-php.sourceforge.net/ Horde does it: https://www.horde.org/apps/ingo

laurentdinclaux avatar Sep 26 '16 22:09 laurentdinclaux

Also be able to filter read/unread on inbox.

pierreozoux avatar Nov 24 '16 11:11 pierreozoux

A sieve management screen is pretty much a standard in webmail systems. I am willing to setup a bounty for this feature. Please contact me for details.

ediazcomellas avatar Jun 30 '17 09:06 ediazcomellas

@ediazcomellas you can donate to the bounty at https://www.bountysource.com/issues/37588385-filtering-of-incoming-messages :)

cc @hitam4450 @zeugmatis @laurentdinclaux @pierreozoux if you’d like this feature too, any donation or contribution is appreciated! :tada:

jancborchardt avatar Jul 04 '17 15:07 jancborchardt

Is there anyone willing to make a try on this issue? I've expanded the bounty to $125. I hope it helps

ediazcomellas avatar Jul 06 '17 17:07 ediazcomellas

@ediazcomellas thanks a lot for the bounty! :)

@nextcloud/mail @ChristophWurst @Gomez @lcalaresu anyone up for solving this? :)

jancborchardt avatar Jul 07 '17 13:07 jancborchardt

FYI: there's a pretty high bounty set for this ticket. Thus, a potential bounty hunter might be interested in implementing this feature. If so, please contact us first here in this ticket and let us know how you want to solve this problem. This will ensure that it's done right and you don't waste too much time on a solution that won't be integrated. Hope that makes sense. Thanks.

ChristophWurst avatar Oct 11 '17 15:10 ChristophWurst

I've raised the bounty to $250... anyone willing to solve it? @denim2x @ChristophWurst @Gomez @lcalaresu @nextcloud/mail Please contact @ChristophWurst to make sure it is integrated with the main tree. It wont be accepted as a solution if it is not merged into upstream.

ediazcomellas avatar Oct 11 '17 15:10 ediazcomellas

Added another 50 to the bounty. Would love this feature.

MG2R avatar Dec 15 '17 14:12 MG2R

I don't know why it is not an attractive bounty. Besides, there is a reference implementation in horde that can be used as a guide.

ediazcomellas avatar Dec 15 '17 14:12 ediazcomellas

We tweeted about the issue to get people involved: https://twitter.com/Nextclouders/status/941701115195940865 – please retweet and spread the word to help make it happen. :smiley:

jancborchardt avatar Dec 15 '17 16:12 jancborchardt

https://github.com/Rainloop/rainloop-webmail has support for sieve filters, its another app, but it may be worth checking how to improve integration of rainloop within nextcloud or get a similar sieve ui from them.

nado avatar Dec 15 '17 16:12 nado

Rainloop from what i saw has a specific way of saving and formatting filters. It would be good to follow the same scheme so that future migrations are painless.

On 15 December 2017 17:13:39 CET, Corentin Pazdera [email protected] wrote:

https://github.com/Rainloop/rainloop-webmail has support for sieve filters, its another app, but it may be worth checking how to improve integration of rainloop within nextcloud or get a similar sieve ui from them.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/nextcloud/mail/issues/44#issuecomment-352045425

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

muppeth avatar Dec 15 '17 17:12 muppeth

Hey @nextcloud/mail, I'd like to implement this.

Should this be under Settings as a section, or should it have its own page? I plan to use the pear/net_sieve package btw.

pierlon avatar Jan 09 '18 19:01 pierlon

^ @jancborchardt

ChristophWurst avatar Jan 09 '18 19:01 ChristophWurst

@pierlon cool stuff! :) Should definitely be in the Settings as a section caled "Filters". That is, the account-specific settings which can be opened through the 3-dot-menu, right? :)

jancborchardt avatar Jan 09 '18 20:01 jancborchardt

@jancborchardt Right 👍

pierlon avatar Jan 09 '18 20:01 pierlon

@pierlon have a look at rainloop's implementation. I find their filter UI great and capable.

I just forgot to save some new rules a couple of time making me loose them, but I guess it is better than a mistake leading to a "lost in the folders jungle" email because of that.

loxK avatar Jan 09 '18 22:01 loxK

@loxK OK thanks.

pierlon avatar Jan 09 '18 22:01 pierlon

Yeah this is pretty crucial. when I downloaded it, it was IMAP only. not sure if pop3 is supported now. either way, straight from host your own mail server - really needs filters. Probably hard to make. not sure $250 is enough. I'd do it for like $5000

ghost avatar Feb 02 '18 02:02 ghost

Would be cool if was built into cron or something, so this could be how you managed your IMAP mail (filters/sorting)

ghost avatar Feb 02 '18 02:02 ghost

To the person who said dovecot can do this already: Do you expect any email user to create a dovecot mail rules congif?

ghost avatar Feb 02 '18 02:02 ghost

Nextcloud being about self-hosting I think most of us are using the mail app on self hosted mail servers.

Sieve server-side filtering rules aren't exclusively supported by Dovecot, see here. Also Sieve server side filters are what most webmails add support for when talking about filtering (roundcube, rainloop, sogo etc.)

loxK avatar Feb 02 '18 02:02 loxK

oh. In that case. sieve rules.

ghost avatar Feb 02 '18 03:02 ghost

Was thinking about this again: sieve... not everyone will have access to that. I have to think eventually pop3 being supported would be a plan. Also, pretty sure a cron task wouldn't scale well. Feels funny, but I think the decision making should be offset to client - I guess it is just like every other email client. I guess it makes sense

ghost avatar Feb 02 '18 03:02 ghost

is there a js sieve library?

ghost avatar Feb 02 '18 03:02 ghost

POP3 support is out of that issue scope. Nextcloud Mail is an IMAP client for now.

loxK avatar Feb 02 '18 04:02 loxK

IMHO sieve is the way to go. Server-side filters are extremely useful: email gets delivered to the correct folder automatically. It doesn't matter if you open the mail with thuderbird, netxtcloud or your email client in your mobile phone.

ediazcomellas avatar Feb 02 '18 05:02 ediazcomellas