From 0f0b0a59957b642f2d62f56895c83692ca339360 Mon Sep 17 00:00:00 2001 From: Martin Whitehouse Date: Fri, 22 Jul 2022 16:27:38 +0200 Subject: [PATCH 1/4] Remove left over 'cc' code --- helpdesk/email.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/helpdesk/email.py b/helpdesk/email.py index 8f92b521..983ff644 100644 --- a/helpdesk/email.py +++ b/helpdesk/email.py @@ -539,19 +539,6 @@ def object_from_message(message, queue, logger): sender_email = email.utils.getaddresses( ['\"' + sender.replace('<', '\" <')])[0][1] - cc = message.get_all('cc', None) - if cc: - # first, fixup the encoding if necessary - cc = [decode_mail_headers(decodeUnknown( - message.get_charset(), x)) for x in cc] - # get_all checks if multiple CC headers, but individual emails may be - # comma separated too - tempcc = [] - for hdr in cc: - tempcc.extend(hdr.split(',')) - # use a set to ensure no duplicates - cc = set([x.strip() for x in tempcc]) - for ignore in IgnoreEmail.objects.filter(Q(queues=queue) | Q(queues__isnull=True)): if ignore.test(sender_email): if ignore.keep_in_mailbox: From 58ed521a2c19552edbccf91650cc04f43ef4666f Mon Sep 17 00:00:00 2001 From: chrisbroderick Date: Sat, 23 Jul 2022 11:58:28 +0100 Subject: [PATCH 2/4] Add the file system deletion app for attachments into INSTALLED_APPS --- docs/install.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/install.rst b/docs/install.rst index 743d34e8..054398af 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -63,6 +63,7 @@ errors with trying to create User settings. 'pinax.teams', # Team support 'reversion', # Required by pinax-teams 'rest_framework', # required for the API + 'django_cleanup.apps.CleanupConfig', # Remove this if you do NOT want to delete fiels on the file system when the associated record is deleted in the database 'helpdesk', # This is us! ) From 0d85acc46006985bc9a745ef6cd340099e4a942c Mon Sep 17 00:00:00 2001 From: chrisbroderick Date: Sat, 23 Jul 2022 12:14:36 +0100 Subject: [PATCH 3/4] Add Django cleanup app for attachment file system deletion --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 97472289..7cc1c79c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,3 +12,4 @@ six pinax_teams djangorestframework django-model-utils +django-cleanup From bdd8e394219cae97222ccfbe9a8deb35d3d4b0ff Mon Sep 17 00:00:00 2001 From: Garret Wassermann Date: Sat, 23 Jul 2022 17:18:01 -0400 Subject: [PATCH 4/4] Update install.rst Fix a docs misspelling --- docs/install.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/install.rst b/docs/install.rst index 054398af..249645d8 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -63,7 +63,7 @@ errors with trying to create User settings. 'pinax.teams', # Team support 'reversion', # Required by pinax-teams 'rest_framework', # required for the API - 'django_cleanup.apps.CleanupConfig', # Remove this if you do NOT want to delete fiels on the file system when the associated record is deleted in the database + 'django_cleanup.apps.CleanupConfig', # Remove this if you do NOT want to delete files on the file system when the associated record is deleted in the database 'helpdesk', # This is us! )