You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by fu...@apache.org on 2020/01/07 01:08:28 UTC
svn commit: r1872403 - in /subversion/trunk/tools/hook-scripts/mailer:
mailer.conf.example mailer.py
Author: futatuki
Date: Tue Jan 7 01:08:27 2020
New Revision: 1872403
URL: http://svn.apache.org/viewvc?rev=1872403&view=rev
Log:
Follow up to 1872398: Use 0 for default smtp_port instead of smtplib.SMTP_PORT
* tools/hook-scripts/mailer/mailer.py (SMTPOutput.finish):
Use 0 instead of smtplib.SMTP_PORT if general.smtp_port is unspecified.
* tools/hook-scripts/mailer/mailer.conf.example ([general]):
Add comment for smtp_port, it is use 465 for SMTP-over-SSL to connect.
Found by: danielsh
Modified:
subversion/trunk/tools/hook-scripts/mailer/mailer.conf.example
subversion/trunk/tools/hook-scripts/mailer/mailer.py
Modified: subversion/trunk/tools/hook-scripts/mailer/mailer.conf.example
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/mailer/mailer.conf.example?rev=1872403&r1=1872402&r2=1872403&view=diff
==============================================================================
--- subversion/trunk/tools/hook-scripts/mailer/mailer.conf.example (original)
+++ subversion/trunk/tools/hook-scripts/mailer/mailer.conf.example Tue Jan 7 01:08:27 2020
@@ -24,7 +24,8 @@
#smtp_hostname = localhost
# This option specifies the TCP port number to connect for SMTP.
-# If it is not specified, 25 is used by default.
+# If it is not specified, 25 is used for SMTP and 465 is used for
+# SMTP-Over-SSL by default.
#smtp_port = 25
# Username and password for SMTP servers requiring authorisation.
Modified: subversion/trunk/tools/hook-scripts/mailer/mailer.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/mailer/mailer.py?rev=1872403&r1=1872402&r2=1872403&view=diff
==============================================================================
--- subversion/trunk/tools/hook-scripts/mailer/mailer.py (original)
+++ subversion/trunk/tools/hook-scripts/mailer/mailer.py Tue Jan 7 01:08:27 2020
@@ -302,7 +302,7 @@ class SMTPOutput(MailedOutput):
if self.cfg.is_set('general.smtp_port'):
smtp_port = self.cfg.general.smtp_port
else:
- smtp_port = smtplib.SMTP_PORT
+ smtp_port = 0
try:
if self.cfg.is_set('general.smtp_ssl') and self.cfg.general.smtp_ssl == 'yes':
server = smtplib.SMTP_SSL(self.cfg.general.smtp_hostname, smtp_port)