FEATURE: allow logging of raw body of all unprocessable email

set log_mail_processing_failures to true to enable
This commit is contained in:
Sam 2015-07-31 15:10:18 +10:00
parent ef0b75386f
commit 6f9dc135ba
3 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,9 @@ module Jobs
end
def handle_failure(mail_string, e)
Rails.logger.warn("Email can not be processed: #{e}\n\n#{mail_string}") if SiteSetting.log_mail_processing_failures
template_args = {}
case e
when Email::Receiver::UserNotSufficientTrustLevelError

View File

@ -1093,6 +1093,7 @@ en:
pop3_polling_host: "The host to poll for email via POP3."
pop3_polling_username: "The username for the POP3 account to poll for email."
pop3_polling_password: "The password for the POP3 account to poll for email."
log_mail_processing_failures: "Log all email processing failures to http://yoursitename.com/logs"
email_in: "Allow users to post new topics via email (requires pop3 polling). Configure the addresses in the \"Settings\" tab of each category."
email_in_min_trust: "The minimum trust level a user needs to have to be allowed to post new topics via email."
email_prefix: "The [label] used in the subject of emails. It will default to 'title' if not set."

View File

@ -491,6 +491,7 @@ email:
pop3_polling_port: 995
pop3_polling_username: ''
pop3_polling_password: ''
log_mail_processing_failures: false
email_in:
default: false
client: true