billzhong/inbox.py

SSLv3 error with google smtp servers

ogonbat opened this issue · 1 comments

Hi

i have a problem with inbox
the idea is use inbox as SMTP Server.
i have 2 servers:
1 - frontend
2 - smtp server

in the frontend i use Mailer to create the email and i connect with the "inbox" smtp server to send emails.

message = Message(From="activation@mydomain.com", To="testemail@gmail.com", charset="utf-8")
message.Subject = "Test Email"
message.Body = """this is a test email"""
sender = Mailer('ip_of_inbox_server')
sender.send(message)

and from the inbox server this is the error

error: uncaptured python exception, 
closing channel <smtpd.SMTPChannel connected 209.85.216.179:63780 at 0x20a4830>
(
    <class 'requests.exceptions.SSLError'>:[Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed 
[/usr/lib/python2.7/asyncore.py|read|83]
 [/usr/lib/python2.7/asyncore.py|handle_read_event|449] 
[/usr/lib/python2.7/asynchat.py|handle_read|158]
[/usr/lib/python2.7/smtpd.py|found_terminator|181]
[./smtpd_leak.py|process_message|20] 
[./smtpd_leak.py|handle|103]
[/opt/smtpdenv/local/lib/python2.7/site-packages/requests/api.py|post|88] 
[/opt/smtpdenv/local/lib/python2.7/site-packages/requests/api.py|request|44] 
[/opt/smtpdenv/local/lib/python2.7/site-packages/requests/sessions.py|request|456] 
[/opt/smtpdenv/local/lib/python2.7/site-packages/requests/sessions.py|send|559] 
[/opt/smtpdenv/local/lib/python2.7/site-packages/requests/adapters.py|send|382])

The problem is the connection with the google smtp server that use SSL
Any idea how to solve this?

thanks in advance for your help

SSL termination would need to occur outside of this app.