leavemealone-app / roadmap

Public roadmap, raise bugs and request features here.
5 stars 0 forks source link

Specify which folder screener monitors #50

Open momorgan opened 2 years ago

momorgan commented 2 years ago

Hello, I know we've discussed this a little by email but I should write it up properly here.

Rather than just looking at the inbox, it'd be desirable to be able to specify which folder(s) the screener monitors. I can think of two use cases:

  1. When an email arrives, many clients (particularly but not exclusively mobile, it seems) can send a notification to the user before the screener manages to grab it. I dunno what witchcraft is being deployed here. @Jivings has suggested the solution is to use server-side filters to drop new mail into an alternative folder that LMA knows about but clients do not. Then LMA can move permitted emails to the inbox and notifications are then triggered, or whatever.

  2. Currently the screener doesn't seem to play well with server-side mail-filtering rules. Maybe it's better in Gmail. Here's an example: Amazon, god love 'em, sends ~4 emails per order placed. You can't block them in case something should go wrong with an order so, to stave off insanity, a user might have set up a filter to tip them straight into another folder. The same might apply to any email you might reasonably expect but not want to read at the moment it arrives -- many newsletter subscriptions would fall into that. That said it would still be useful to let LMA pick these up so that they could be rolled up (or, better still, further filtered so that those of particular interest can be moved to inbox).

Jivings commented 2 years ago

Thanks for writing this out!

The problem is there's a delay of ~2 seconds before we receive the event that says there's a new mail, and often this means the mail client has time to notice it and ping a notification.

  1. My best solution for this is to let the user specify the folder to watch, eg the _lma-inbox folder. A Gmail user could then set up a catch all filter that moves all incoming mail into the _lma-inbox folder, where we sort it into rollups etc. Because the mail doesn't hit the inbox, mail clients wont ping a notification to the user.

Once we have the access to the Gmail API I think this is probably what we will end up doing by default anyway, so it's definitely worth addressing (the question for us is really do we bother doing it now or do it as part of the Gmail audit work @dinkydani - I think probably roll it into the latter).

  1. Perhaps I'm misunderstanding your second point I think the screener/roller should already work for 2). We should be notified by Gmail for anything that arrives in the "All Mail" folder (which is everything), and for other clients we watch the INBOX, which should also be everything that arrives before it's filtered into a folder (at least I think so).
Jivings commented 2 years ago

We actually shouldn't need to change much to make this work:

momorgan commented 2 years ago

other clients we watch the INBOX, which should also be everything that arrives before it's filtered into a folder

Not in my experience. Outside of gmail, I can set up server-side mail-routing rules that push inbound emails straight to a folder other than the inbox.

I wanted to add one more justification for this improvement, which is that is it stands, LMA can cause double notifications, which is counterproductive. If a mail is marked as allowed in LMA, I'm getting a notification as it comes in (before LMA picks it up), and then another a minute or so later once LMA has taken it out of the inbox and put it back again.

Jivings commented 2 years ago

I do agree that double notifications are very bad but I'm not sure what you mean by the last part. If it's not blocked by the screener then we should not touch it at all, we wont ever take it out of the inbox and then put it back again. Do you only get notified of things hitting the inbox?

momorgan commented 2 years ago

I think a lot of clients will let you monitor multiple folders, but yes, I get notifications only for the inbox.

So I have had instances where:

  1. I get a notification and preview, because the mail went to inbox
  2. I go to the inbox and it's not there because the screener has picked it up and moved it
  3. something then happens and the emails is moved back to inbox
  4. I get another notification

I can't identify at this moment what happens in the middle but next time it happens I'll try and catch the ID.

Jivings commented 2 years ago

I agree, that sounds bad. The only way we ever specifically move emails to the INBOX is the first time you click "keep" on them in the Screened emails list.

Jivings commented 2 years ago

I'm now beta testing this. I think it's mostly working, except for some reason Gmail is not letting us move emails back out from the _lma-inbox folder to the Inbox 🤷‍♂️

momorgan commented 2 years ago

Okay great, that's encouraging. Does anyone even use Gmail anymore?

;)

Lemme know if you need me to test something.

Jivings commented 2 years ago

Sorry for the delay! If you're still interested in testing this @momorgan then we have a version live that we're using in beta. Let me know!

momorgan commented 2 years ago

Yes, absolutely :)

Jivings commented 2 years ago

Can you send a message in support chat on the website and I can update your account 👍