discourse/lib/imap/providers
Martin Brennan 87961534ea
FEATURE: IMAP detect spammed email and delete associated Discourse topic (#11654)
This PR adds functionality for the IMAP sync code to detect if a UID that is missing from the mail group mailbox is in the Spam/Junk folder for the mail account, and if so delete the associated Discourse topic. This is identical to what we do for emails that are moved for Trash.

If an email is missing but not in Spam or Trash, then we mark the incoming email record with imap_missing: true. This may be used in future to further filter or identify these emails, and perhaps go hunting for them in the email account in bulk.

Note: This adds some code duplication because the trash and spam email detection and handling is very similar. I intend to do more refactors/improvements to the IMAP sync code in time because there is a lot of room for improvement.
2021-01-14 09:54:18 +10:00
..
detector.rb FIX: IMAP archive fix and group list mailbox code unification (#10355) 2020-08-04 14:19:57 +10:00
generic.rb FEATURE: IMAP detect spammed email and delete associated Discourse topic (#11654) 2021-01-14 09:54:18 +10:00
gmail.rb DEV: IMAP log to database (#10435) 2020-08-14 12:01:31 +10:00