nextcloud / mail

💌 Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
830 stars 257 forks source link

Filtering of Incoming messages #44

Open hitam4450 opened 8 years ago

hitam4450 commented 8 years ago

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

--- There is a **[$800 open bounty](https://www.bountysource.com/issues/37588385-filtering-of-incoming-messages?utm_campaign=plugin&utm_content=tracker%2F44154351&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F44154351&utm_medium=issues&utm_source=github).

badge

--- There is a **[$800 open bounty](https://www.bountysource.com/issues/37588385-filtering-of-incoming-messages?utm_campaign=plugin&utm_content=tracker%2F44154351&utm_medium=issues&utm_source=github)** on this issue. Add to the bounty at [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F44154351&utm_medium=issues&utm_source=github).
zeugmatis commented 8 years ago

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 commented 8 years ago

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.

laurentdinclaux commented 7 years ago

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

pierreozoux commented 7 years ago

Also be able to filter read/unread on inbox.

ediazcomellas commented 7 years ago

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.

jancborchardt commented 7 years ago

@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:

ediazcomellas commented 7 years ago

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

jancborchardt commented 7 years ago

@ediazcomellas thanks a lot for the bounty! :)

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

ChristophWurst commented 6 years ago

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.

ediazcomellas commented 6 years ago

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.

MG2R commented 6 years ago

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

ediazcomellas commented 6 years ago

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.

jancborchardt commented 6 years ago

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:

nado commented 6 years ago

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.

muppeth commented 6 years ago

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 notifications@github.com 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.

pierlon commented 6 years ago

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.

ChristophWurst commented 6 years ago

^ @jancborchardt

jancborchardt commented 6 years ago

@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? :)

pierlon commented 6 years ago

@jancborchardt Right 👍

loxK commented 6 years ago

@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.

pierlon commented 6 years ago

@loxK OK thanks.

ghost commented 6 years ago

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 commented 6 years ago

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

ghost commented 6 years ago

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

loxK commented 6 years ago

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.)

ghost commented 6 years ago

oh. In that case. sieve rules.

ghost commented 6 years ago

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 commented 6 years ago

is there a js sieve library?

loxK commented 6 years ago

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

ediazcomellas commented 6 years ago

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.

ghost commented 6 years ago

yeah, but not just server side, just in case they cant change their config - what if that server doesn't support sieve, or pretty sure not all sieve [server] support includes remote management by regular user. I saw a thunderbird plugin that looks like it does a good job - in the screen shots. Haven't tried it. See, I'm not sure if I'd have to install extra stuff for dovecot to support the remote management of sieve configs. I bet some people would have to. So, it should have client side fall back, feedback, instructions on how to edit the config, etc.

ediazcomellas commented 6 years ago

Server side and client side are two different tasks. I will consider this task done, and concede the bounty, if the server side is done.

Being nextcloud about selfhosting, there is a good chance that the admin can add sieve in the server, and any commercial service that is worth the money will already have sieve in the imap server anyway.

ediazcomellas commented 6 years ago

Anyone willing to take this issue? I really want to give the bounty :)

mezenok commented 6 years ago

@ediazcomellas I made a quick look on the issue comments and I think I can help you with it. If this issue is still active and needs a solution - let me know. BTW: Is it still related to this bounty - https://www.bountysource.com/issues/37588385-filtering-of-incoming-messages?

loxK commented 6 years ago

@mezenok if it was solved the status of this issue would have reflected it. Also, you'll find the related bounty referenced in the first post of this issue.

e-alfred commented 6 years ago

@TheLastTech As there is no PR and this isn't closed, I would say yes.

ghost commented 6 years ago

Hey @TheLastTech @kylepwarren @pierlon @mezenok,

Any progress on this and are you interested in teaming up for completing this?

cc @ChristophWurst

PanderMusubi commented 6 years ago

You can add this line at the top of the issue description, it will update itself

![badge](https://api.bountysource.com/badge/issue?issue_id=37588385)

and it looks like

badge

ghost commented 6 years ago

@PanderMusubi But it's a lie, the acutal bounty that can be cashed out is ~630$ because of the 10% bountysource fee.

PanderMusubi commented 6 years ago

🤔 Perhaps time for an API on top of this API that deducts the fee.

ghost commented 6 years ago

@ediazcomellas Why is this comment marked as outdated? :D https://gyazo.com/f9b55c46b4523bfefdc8c0b8904dd133

ChristophWurst commented 6 years ago

You can add this line at the top of the issue description, it will update itself

The issue description should update automatically. I notified the person who set this up to check if the integration has to be-enabled.

ediazcomellas commented 6 years ago

@LemonAndroid I have no idea... The bounty is still open and awaiting for someone to take it. Please note that only a solution that is accepted upstream will be awarded the bounty.

andycowan commented 6 years ago

Hi - if no-one else is working on this, I'd like to volunteer to have a crack at it.

ChristophWurst commented 6 years ago

@Krymson awesome. Please let us know which approach you plan on implementing before starting your actual work so that we can make sure it's actually something we'd eventually integrate. Also, please see #1045 because we're restructuring/rewriting parts of this app at the moment and this might conflict.

andycowan commented 6 years ago

It will be a settings page to manage sieve filters on the mail server via the managesieve protocol described in RFC5804.

Additionally there will be a page to set up a simple out of office notification using the same mechanism (but making it obvious as opposed to something you can do with filters).

Do you need more detail?

ghost commented 6 years ago

@ChristophWurst @Krymson Any progress on this?

ChristophWurst commented 6 years ago

It will be a settings page to manage sieve filters on the mail server via the managesieve protocol described in RFC5804.

You might want to wait for the completion of #1045 in this regard.

Other than that I'd like to see how you'd technically implement this. How will you build the UI? How will you configure sieve rules on the IMAP server? How do you handle servers that don't support sieve filtering?

Thanks.

nado commented 6 years ago

So basically, still waiting? Rainloop for nextcloud is not supported in nc14 and official mail app doesnt support filters. I guess I’ll wait on nc13 for some time this year.

ghost commented 6 years ago

@nado why is rainloop not supported in nc14 and why is nextcloud/mail superior to rainloop?