libremail icon indicating copy to clipboard operation
libremail copied to clipboard

Ability to sync specific account & folder #104. Docs typo. Fix default other smtp port to from 993 to 586.

Open netandreus opened this issue 5 years ago • 14 comments

What problem or bug does this solve? #104

netandreus avatar Mar 11 '20 09:03 netandreus

Thank you @netandreus, I took out the parts that had to do with the --email flag and moved them over to branch issue104. This branch still has a lot of other fixes in it, but I think it just needs a little more work. I can provide some comments later this week or weekend.

mikegioia avatar Mar 11 '20 16:03 mikegioia

Sorry @mikegioia That's my fault. I should do every fix in separated branch, and then send number of pull requests to you. I'll be waiting for your comments about this.

netandreus avatar Mar 11 '20 17:03 netandreus

No problem at all @netandreus. I really appreciate what you're doing by the way. It's great to have your help!

mikegioia avatar Mar 11 '20 17:03 mikegioia

Thanks, @mikegioia :) I plan to write "watcher", which will be take persistant connects to IMAP servers and watch for events 'mail' / 'update' / 'purge' and when event occurs - watcher will be start sync process with email and folder passing parameters. Thats why I need to #109 It can help to avoid "contact bounce" effect. What do you think about this?

netandreus avatar Mar 11 '20 17:03 netandreus

I like that a lot, I do however think it might need quite a bit of testing and work to get it both integrated properly and written using the same coding conventions. Would you mind if we kept it all in a separate branch for the time being?

mikegioia avatar Mar 11 '20 17:03 mikegioia

Sure, separate branch - is that we need. I push some fixes for correct work with Exchange (office365.com).

netandreus avatar Mar 11 '20 18:03 netandreus

I create branch "developer" here https://github.com/netandreus/libremail/tree/develop I will do work by issues in main (your) repository and push them to this branch. It will be like "stable" branch of my work. Then we can time to time push from netandreus/libremail/tree/develop to mikegioia/libremail/tree/develop for example. Is it suitable? Or may be you can suggest another approach?

netandreus avatar Mar 11 '20 18:03 netandreus

Yeah I like that a lot. I think that will be easier to manage.

mikegioia avatar Mar 11 '20 18:03 mikegioia

Hello, @mikegioia Can you browse my pull requests and write me (here or to email / messengers) which of this you can pull / which I should modify maybe / etc ?

netandreus avatar Mar 16 '20 07:03 netandreus

If you don't mind, the only parts here that should be kept are the ignored folders and the outlook365 config. I will want to pull it into a branch and modify the code though, as it needs to be reviewed and re-formatted to match the rest of the app's style.

mikegioia avatar Mar 16 '20 12:03 mikegioia

@netandreus I was reading through this one, and I have some more info on why the ignored folders was a constant. [Gmail] is not a real folder but comes back as one and should always be ignored (I think), but what you're trying to do needs to / should happen at the mailbox level.

You should be setting your inbox to not download those folders via IMAP, and I think pushing that to LibreMail might be a mistake.

For instance, that config setting breaks down if you ever want one account to ignore a folder but another account to NOT ignore that same folder.

Do you see anything like this in your email settings: image

Most services have this checkbox "Show in IMAP" which makes the folder available to IMAP.

mikegioia avatar Mar 16 '20 13:03 mikegioia

@mikegioia , I just read your comment.

You should be setting your inbox to not download those folders via IMAP, and I think pushing that to LibreMail might be a mistake.

Unfortunately there is no such settings in Office365 (cloud based Microsoft Exchange).

office365_settings_mail_sync

Most services have this checkbox "Show in IMAP" which makes the folder available to IMAP.

But not Microsoft :)

For instance, that config setting breaks down if you ever want one account to ignore a folder but another account to NOT ignore that same folder.

Yes, I agree with you. We should determine such folders per account, not global. Yesterday I have seen this issue https://github.com/mikegioia/libremail/issues/31 (Multiple failed attempts to sync a folder should be logged and marked inactive) I think we can realize it and if we can not sync folder for example for 3 times, then mark it as ignored. If we don't do this infinity loop will occured.

infinity_loop

What do you think about this idea?

netandreus avatar Mar 18 '20 16:03 netandreus

Thank you @netandreus, excellent write up here.

I think the only two ways we can solve the ignored folders are either (1) in the config (I don't like this one as much) or (2) in the web application itself (admin client and/or the email client). If we went with option 2, we could add a settings page to let the end-user deselect folders he/she wants to ignore on a per-account basis. Option 1 is definitely quicker to implement though.

For the time being, if you want to ignore a folder, you might have to manually set ignore=1 in SQL. That's what I have to do currently to address the issue in #31 :(

Issue #31 is probably higher priority than both of these, but let me know what you think of all this.

mikegioia avatar Mar 18 '20 16:03 mikegioia

I found the solution, @mikegioia Please see https://github.com/mikegioia/libremail/pull/121 Waiting for your reply.

netandreus avatar Mar 19 '20 12:03 netandreus