comparison development.ini @ 8233:34846d33498d stable

mails: make error reporting by mail work with secure mail servers Even with Kallithea mails working, TurboGears / backlash error reporting would fail like: Error while reporting exception with <backlash.tracing.reporters.mail.EmailReporter object at 0x7f8f986f8710> Traceback (most recent call last): File ".../env/lib/python3.7/site-packages/backlash/tracing/reporters/mail.py", line 49, in report result = server.sendmail(self.from_address, self.error_email, msg.as_string()) File "/usr/lib64/python3.7/smtplib.py", line 867, in sendmail raise SMTPSenderRefused(code, resp, from_addr) smtplib.SMTPSenderRefused: (530, b'5.7.0 Must issue a STARTTLS command first.', 'kallithea@example.com') Extend the .ini template to forward all the mail settings described on https://turbogears.readthedocs.io/en/latest/reference/config-options.html#error-reporting
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 10 Feb 2020 15:35:05 +0100
parents 7c7d6b5c07c7
children 8169770a4f2c
comparison
equal deleted inserted replaced
8155:2571674c4a2f 8233:34846d33498d
52 ## If specifying credentials, make sure to use secure connections. 52 ## If specifying credentials, make sure to use secure connections.
53 ## Default: Send unencrypted unauthenticated mails to the specified smtp_server. 53 ## Default: Send unencrypted unauthenticated mails to the specified smtp_server.
54 ## For "SSL", use smtp_use_ssl = true and smtp_port = 465. 54 ## For "SSL", use smtp_use_ssl = true and smtp_port = 465.
55 ## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587. 55 ## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.
56 smtp_server = 56 smtp_server =
57 #smtp_username = 57 smtp_username =
58 #smtp_password = 58 smtp_password =
59 smtp_port = 59 smtp_port =
60 #smtp_use_ssl = false 60 smtp_use_ssl = false
61 #smtp_use_tls = false 61 smtp_use_tls = false
62 62
63 ## Entry point for 'gearbox serve' 63 ## Entry point for 'gearbox serve'
64 [server:main] 64 [server:main]
65 #host = 127.0.0.1 65 #host = 127.0.0.1
66 host = 0.0.0.0 66 host = 0.0.0.0
328 ## ERROR HANDLING SYSTEMS ## 328 ## ERROR HANDLING SYSTEMS ##
329 ############################ 329 ############################
330 330
331 # Propagate email settings to ErrorReporter of TurboGears2 331 # Propagate email settings to ErrorReporter of TurboGears2
332 # You do not normally need to change these lines 332 # You do not normally need to change these lines
333 get trace_errors.error_email = email_to
334 get trace_errors.smtp_server = smtp_server 333 get trace_errors.smtp_server = smtp_server
335 get trace_errors.smtp_port = smtp_port 334 get trace_errors.smtp_port = smtp_port
336 get trace_errors.from_address = error_email_from 335 get trace_errors.from_address = error_email_from
336 get trace_errors.error_email = email_to
337 get trace_errors.smtp_username = smtp_username
338 get trace_errors.smtp_password = smtp_password
339 get trace_errors.smtp_use_tls = smtp_use_tls
337 340
338 ################################################################################ 341 ################################################################################
339 ## WARNING: *DEBUG MODE MUST BE OFF IN A PRODUCTION ENVIRONMENT* ## 342 ## WARNING: *DEBUG MODE MUST BE OFF IN A PRODUCTION ENVIRONMENT* ##
340 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ## 343 ## Debug mode will enable the interactive debugging tool, allowing ANYONE to ##
341 ## execute malicious code after an exception is raised. ## 344 ## execute malicious code after an exception is raised. ##