diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-12 05:51:13 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-12 05:51:13 +0000 |
commit | 25710c946ee439e3eee94c3417648c873e66399a (patch) | |
tree | 60eefdcfe3af0caf7e2016d2a8b34b9bc803e6dd /pym/portage_mail.py | |
parent | c3cd9d603edffed4b2b183875c2aa29ac2af6244 (diff) | |
download | portage-25710c946ee439e3eee94c3417648c873e66399a.tar.gz portage-25710c946ee439e3eee94c3417648c873e66399a.tar.bz2 portage-25710c946ee439e3eee94c3417648c873e66399a.zip |
Handle Exceptions in mod_mail_summary.finalize() and
check if the server actually supports TLS, bug #183808
(trunk r7984 and r8058)
svn path=/main/branches/2.1.2/; revision=8059
Diffstat (limited to 'pym/portage_mail.py')
-rw-r--r-- | pym/portage_mail.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pym/portage_mail.py b/pym/portage_mail.py index 99ed77fda..d12f85c07 100644 --- a/pym/portage_mail.py +++ b/pym/portage_mail.py @@ -74,7 +74,11 @@ def send_mail(mysettings, message): try: if int(mymailport) > 100000: myconn = smtplib.SMTP(mymailhost, int(mymailport) - 100000) + myconn.ehlo() + if not myconn.has_extn("STARTTLS"): + raise portage_exception.PortageException("!!! TLS support requested for logmail but not suported by server") myconn.starttls() + myconn.ehlo() else: myconn = smtplib.SMTP(mymailhost, mymailport) if mymailuser != "" and mymailpasswd != "": |