Is there a Python MTA (Mail transfer agent) [closed]
Asked Answered
T

4

14

Just wondering if there is a Python MTA. I took a look at smtpd but they all look like forwarders without any functionality.

Tallou answered 24/4, 2009 at 1:27 Comment(6)
Maybe because I am annoyed that whenever I try one of the smtplib examples, it always tries to connect to localhost and fails?Tallou
Note that all of the answers so far (Twisted, Lamson and Slimta) are for Python 2.x. So, if anyone knows of an MTA for Python 3.x (cross-platform, ideally), I would appreciate your knowledge. I know they have a goal to make at least one of those Python 3.3 compatible.Unkennel
lamson is long deadCarty
@Tallou I also want a solution that does not use stmplib libraries if possible. I am alway having issues with the libraries too. The most notable is that my code breaks when I change node/server. Plus it requires me to be pasting my password around or moving a password file. I don't want to login to anything to send an e-mail. Just send the email. I don't want to login to my gmail to send email from my code.Temekatemerity
crosspostrd: quora.com/unanswered/… reddit.com/r/Python/comments/ixlnvd/…? reddit.com/r/learnpython/comments/ixlq81/…? hopefully we can solve this issue conclusively so I never have to have another issue with sending emails from python.Temekatemerity
looking for an answer that works with python 3. as the OP said I also have had many issues with smtp servers so I am trying to move away from them. Some issues are that they don't work reliably on different servers/nodes and force me to connect to places that need my password which means it complicates things as I need to keep moving my password around when I want to send an email.Temekatemerity
G
7

Yes, Twisted includes a framework for building SMTP servers. There's a simple Twisted-based email server available here (also see here for some information about its development).

If you want something closer to a mail application server, there's Lamson.

Gimmick answered 24/4, 2009 at 3:31 Comment(2)
what about something for python 3?Temekatemerity
Twisted works on Python 3.Gimmick
B
7

If you're looking for a full MTA solution you should check out http://slimta.org/ or as previously mentioned here http://lamsonproject.org I myself has experimented a bit with slimta and it seems to work well.

Bulganin answered 5/4, 2014 at 10:42 Comment(1)
what about something for python 3?Temekatemerity
R
5

It's pretty new, so nothing like the maturity of Twisted's SMTP, but there's also Lamson.

Ragwort answered 24/4, 2009 at 4:29 Comment(1)
what about something for python 3?Temekatemerity
T
2

Blackhole is an MTA (message transfer agent) that (figuratively) pipes all mail to /dev/null, built on top of asyncio and utilises async def and await statements available in Python 3.5.

While Blackhole is an MTA, none of the actions performed via SMTP or SMTPS are actually processed, and no email is delivered. You can tell Blackhole how to handle mail that it receives. It can accept all of it, bounce it all, or randomly do either of those two actions.

Think of Blackhole sort of like a honeypot in terms of how it handles mail, but it’s specifically designed with testing in mind.

Documentation You can find the latest documentation here.

Changelog You can find a list of changes on the blackhole website. https://kura.github.io/blackhole/changelog.html

Tortuga answered 29/9, 2020 at 7:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.