Tags: patch

It is quite possible that this problem is the same I have encountered. For me, 
the reason is in bad handling of the smtptls option. It looks like the smtp 
protocol is not followed strictly enough.

To make sure an SMTP server honours our STARTTLS command, we should send the 
EHLO command first. If not, the response we get (OK or error) is highly 
dependant on the server implementation and/or configuration.

Furthermore, STARTTLS should be followed by another EHLO in order to discover 
those server capabilities that may be hidden before the connection is 
encrypted, particularily AUTH that could be not advertised in plain text mode 
to avoid passwords spoofing.

The bug is present in both stable (3.8) and unstable/testing (3.21.2) current 
versions of the package.

I enclose a trivial patch that should correct the problem (not tested yet, as 
i have no other bug to report for now :).

Janusz

--------------------------------------------------------------------------
> I can't use qmail's stmp to send email in reportbug
>
> -- Package-specific info:
> ** /root/.reportbugrc:
...
> smtptls

--- reportbug-3.8/reportbug_submit.py	2005-02-11 06:28:38.000000000 +0100
+++ reportbug-3.8-starttls/reportbug_submit.py	2006-07-29 13:01:46.000000000 +0200
@@ -349,7 +349,9 @@
         try:
             conn = smtplib.SMTP(smtphost)
             if smtptls:
+                conn.ehlo()
                 conn.starttls()
+                conn.ehlo()
             if smtpuser:
                 if not smtppasswd:
                     smtppasswd = ui.get_password(

Reply via email to