diff --git a/docs/install.rst b/docs/install.rst index ab02a73d..b8195027 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -102,3 +102,10 @@ Adding To Your Django Project 9. Load initial e-mail templates, otherwise you will not be able to send e-mail:: python manage.py loaddata emailtemplate.json + +10. If you intend on using local mail directories for processing email into tickets, be sure to create the mail directory before adding it to the queue in the Django administrator interface. The default mail directory is ``/var/lib/mail/helpdesk/``. Ensure that the directory has appropriate permissions so that your Django/web server instance may read and write files from this directory. + + Note that by default, any mail files placed in your local directory will be permanently deleted after being successfully processed. It is strongly recommended that you take further steps to save emails if you wish to retain backups. + + Also, be aware that if a disk error occurs and the local file is not deleted, the mail may be processed multiple times and generate duplicate tickets until the file is removed. It is recommended to monitor log files for ERRORS when a file is unable to be deleted. + diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 55a92a4f..51c326a6 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -239,7 +239,7 @@ def process_queue(q, logger): if ticket: logger.info("Successfully processed message %s, ticket/comment created." % str(m)) try: - # unlink(m) #delete message file if ticket was successful + unlink(m) # delete message file if ticket was successful logger.info("Successfully deleted message %s." % str(m)) except: logger.error("Unable to delete message %s." % str(m))