IMAP source improvements

- Support multiple STORE commands. Defaults to +FLAGS (\Deleted)
  to conserve current behavior.
- Support custom search criteria. Defaults to NOT DELETED
  to converse current behavior.
- Support enabling/disabling IMAP expunge command
  after each message. Defaults to True to conserve
  current behavior.
- Increase functionality of the MockIMAPServer

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-10-24 04:01:51 -04:00
parent 1b6468522a
commit 4dea4129db
10 changed files with 294 additions and 54 deletions

View File

@@ -120,7 +120,10 @@ class EmailSetupBaseForm(forms.ModelForm):
class IMAPEmailSetupForm(EmailSetupBaseForm):
class Meta(EmailSetupBaseForm.Meta):
fields = EmailSetupBaseForm.Meta.fields + ('mailbox',)
fields = EmailSetupBaseForm.Meta.fields + (
'mailbox', 'search_criteria', 'store_commands',
'mailbox_destination', 'execute_expunge'
)
model = IMAPEmail