dataflake.org

Home Documentation Software Old Stuff Bug Reporting

Problem with MaildropHost and GMail (Resolved)

Request MaildropHost -- bug report -- by Johnny Souza
Posted on Oct 18, 2007 8:36 am
Subscribe

Enter your email address to receive mail on every change to this issue.

Entries (Latest first)


  Resolve by Jens Vagelpohl on Oct 18, 2007 10:07 am
  Thanks for your report, I incorporated your patch:

http://svn.dataflake.org/?view=rev&revision=1433

 

  Initial Request by Johnny Souza on Oct 18, 2007 8:36 am
  PROBLEM:
The procces that effectively send the emails to SMTP server don't start when uses smtp.gmail.com as SMTP server.


ERROR MESSAGE:
Traceback (most recent call last):
File "/home/johnnysouza/zope/instancias/plone253/Products/MaildropHost/maildrop/maildrop.py", line 291, in ?
mail_server.login(MAILDROP_LOGIN, MAILDROP_PASSWORD)
File "/home/johnnysouza/zope/python244//lib/python2.4/smtplib.py", line 554, in login
raise SMTPException("SMTP AUTH extension not supported by server.")
SMTPException: SMTP AUTH extension not supported by server.
Usage: maildrop.py /path/to/config.py

An error occured, aborting...
Maildrop Error: Invalid SMTP server "smtp.gmail.com:587"


SOLUTION:
Execute ehlo() after connect to server and too after starttls(). See diff bellow.

Index: maildrop/maildrop.py
===================================================================
--- maildrop/maildrop.py (revisao 1432)
+++ maildrop/maildrop.py (copia de trabalho)
@@ -283,9 +283,11 @@

try:
mail_server = smtplib.SMTP(SMTP_HOST, SMTP_PORT)
+ mail_server.ehlo()

if MAILDROP_TLS > 1:
mail_server.starttls()
+ mail_server.ehlo()

if MAILDROP_LOGIN != '' and MAILDROP_PASSWORD != '':
mail_server.login(MAILDROP_LOGIN, MAILDROP_PASSWORD)