offlineimap icon indicating copy to clipboard operation
offlineimap copied to clipboard

Office 365: auto-configure folderfilter by default

Open mcrosson opened this issue 8 years ago • 6 comments

In an attempt not to re-open #62 I'm opening this ticket to alert the author of more Office 365 / Exchange folders beyond "Calendar" that need to be filtered. Note I'm NOT asking for updates to the app to accommodate, merely pointing out more instances that have trouble. They may deserve to be added to the FAQ alongside "Calendar".

Full set of folders requiring filter (for me): folderfilter = lambda folder: folder not in ['Calendar', 'Calendar/Birthdays', 'Calendar/Sub Folder 1', 'Calendar/Sub Folder 2', 'Calendar/United States holidays', 'Contacts', 'Contacts/Sub Folder 1', 'Contacts/Sub Folder 2', 'Contacts/Skype for Business Contacts', 'Deleted Items', 'Drafts', 'Journal', 'Junk Email', 'Notes', 'Outbox', 'Sync Issues', 'Sync Issues/Conflicts', 'Sync Issues/Local Failures', 'Sync Issues/Server Failures', 'Tasks', 'Tasks/Sub Folder 1', 'Tasks/Sub Folder 2']

mcrosson avatar Mar 30 '17 19:03 mcrosson

Thank you very much for this report. Starting a new issue was the good thing to do. ,-) I'll improve the doc.

nicolas33 avatar Mar 30 '17 21:03 nicolas33

It'd be brilliant to auto-detect the type of imap server - Dovecot, Cyrus, Exchange, Yahoo, Gmail, etc. At that point, it'd be simple to auto activate a set of corresponding filters, such as these.

chris001 avatar Mar 30 '17 22:03 chris001

The really problematic servers are Microsoft's products. Actually, auto-detection might be the good thing to do at that point. Not only for filtering. I don't know.

As for any other feature, we would need to see patches to estimate if it's too much addition and if this fits well within the current code base. ,-)

nicolas33 avatar Mar 31 '17 00:03 nicolas33

Documentation updated: http://www.offlineimap.org/doc/FAQ.html#exchange-and-office365.

nicolas33 avatar May 02 '17 04:05 nicolas33

True, Every commercial IMAP mail server likes to "innovate" on top of the standards, trying to make the experience more customized for their users, and lock them in so they never leave. Gmail, Exchange the most well known ones. This is why it'd be brilliant to dynamically auto-detect the server, and by default, activate relevant filters and use different IMAP conversation behaviors.

Any remote email address ending in @gmail.com should automatically use the gmail behavior, and have its IMAP server, if missing, set to imap.gmail.com, port to 993, SSL on, and login with X-OAUTH2. Any remote email address ending in @hotmail.com or @outlook.com, similarly has widely known defaults.

In fact, using the Mozilla ISPDB python module, for Thunderbird default email settings configuration, would be brilliant help for users: https://github.com/dveeden/ispdb Users would usually only enter their email address for the remote, and most of the time, all other details would be satisfied by the ISPDB defaults, and set by the app. If no defaults available, an error message would prompt them to find and enter them.

chris001 avatar May 02 '17 14:05 chris001

Following up from #507 on the topic of auto-detecting which type of IMAP server we are talking to.

  • There's in fact 2 very similar automatic email client setup standards.
  1. autoconfig (Thunderbird Linux open source world) and
  2. autodiscover (Microsoft outlook.com hotmail.com office365.com )
  • These 2 web service standards automate the configuration of the mail client (Offlineimap),
  • All you need for input data is 1. the email address and 2. the domain (extracted from the email address).
  • This standard is supported by popular linux hosting panels (virtualmin, cpanel, etc) and Microsoft Oulook.com Hotmail and Office365. This project is php example implementation of automating the email account setup, with only email address as input data. https://github.com/Thorarin/MailClientAutoConfig
  • Offlineimap should be updated to use this autoconfig/autodiscover email account parameter detection method by default, because it works probably 95% of the time. It depends only on the mail server having this feature enabled. 99% of microsoft servers have it enabled. 90% of linux servers have it enabled. For the rare times isn't enabled, the user can add their parameters to offlineimap config file manually.
  1. Visit http://autoconfig.example.com/mail/[email protected] (where [email protected] is a valid email address delivered to a single local mailbox). You should see an XML file in which you recognize the settings you've provided. If you get an empty response, check the error log of your web server.
  2. Visit https://autoconfig.example.com/mail/[email protected] to test your SSL setup. You should see the same file. If this does not work, check your SSL setup. If everything appears to work, test by adding the mail account to Thunderbird and Outlook itself.

EDIT Opening new issue instead...

chris001 avatar Nov 15 '17 22:11 chris001