On Tue, May 16, 2023 at 7:07 AM Tim Moody <t...@timmoody.com> wrote: > > Thanks. That got me closer. I was not using ssl. When I took your code and > tried to connect to localhost I got > > STARTTLS extension not supported by server
*nod* The local relay is bound to localhost, so I guess we never worried about adding transport security. I would hope that things would work by just leaving out the starttls() call and related ssl setup. I have not tested that myself at this point however. > when I connected to mx-out03.wmcloud.org I got > > (220, b'TLS go ahead') > > But when I then do > > server.sendmail("nore...@wikimedia.org", "t...@tim.com", > ... """Subject: smtplib example from Cloud VPS > ... ... > ... ... Hello world. > ... ... --- > ... ... Bryan""") > > I get SSL: WRONG_VERSION_NUMBER I saw that in one of my own tests as well. I don't have a good explanation of what triggered it. > In the console /usr/sbin/sendmail -v t...@tim.com <email.txt > > works just fine, so maybe I should just use subproc. If shelling out to the sendmail client works for your use case, go for it! Simpler is nicer in most things. :) Bryan -- Bryan Davis Technical Engagement Wikimedia Foundation Principal Software Engineer Boise, ID USA [[m:User:BDavis_(WMF)]] irc: bd808 _______________________________________________ Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-le...@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/