smtpd

Python/Django SMTP DebugServer doesn't catch emails

試著忘記壹切 提交于 2019-12-12 18:28:58
问题 I'm starting the server (on mac) this way: python -m smtpd -n -c DebuggingServer localhost:9999 and i don't get any errors or any other notifications. I guess it means all is ok, correct me if i'm wrong. But when i send emails from django shell or from my app, using send_mail/mail_managers with fail_silently=False, i dont see any output on smtpd debug server. I dont get any SMTPErrors, and send_mail/mail_managers returns 1. I ran: lsof -i | grep LISTEN to see if anyone listens to port 9999,

Logging SMTP connections with Twisted

若如初见. 提交于 2019-12-12 10:25:13
问题 Python newbie here. I'm writing an SMTP server using Twisted and twisted.mail.smtp. I'd like to log incoming connections and possibly dump them when there are too many concurrent connections. Basically, I want ConsoleMessageDelivery.connectionMade() method to be called in the following, when a new connection is made: class ConsoleMessageDelivery: implements(smtp.IMessageDelivery) def connectionMade(self): # This never gets called def receivedHeader(self, helo, origin, recipients): myHostname,

What is the easiest way for a Java application to receive incoming email?

旧时模样 提交于 2019-12-12 07:08:51
问题 Sending email is easy with commons-email, and with spring it is even easier. What about receiving incoming email? Are there easy to use APIs that allow to bounce emails, process attachments, etc. 回答1: SubEthaSMTP Mail Server allows you to create your own SMTP Server for receiving emails. 回答2: James is probably your best bet, but email handling is extremely complex, requiring not only configuration of your MTA (the James server), but also DNS. In the past, I've found it easier to initiate my

Cleanup of resources with the SMTP module of Twisted Python

核能气质少年 提交于 2019-12-08 02:51:48
问题 This is related to the previously answered question here: Logging SMTP connections with Twisted. I have a database resource that I create in each instance of ConsoleMessageDelivery that I need to ensure is cleaned up when the socket is closed. I have a WrappingFactory called DenyFactory and the DenyFactory.unregisterProtocol method is called when the socket is closed, but I have no way (that I can figure out) how to access the resource created in the ConsoleMessageDelivery instance that's

Cleanup of resources with the SMTP module of Twisted Python

不羁岁月 提交于 2019-12-06 11:12:23
This is related to the previously answered question here: Logging SMTP connections with Twisted . I have a database resource that I create in each instance of ConsoleMessageDelivery that I need to ensure is cleaned up when the socket is closed. I have a WrappingFactory called DenyFactory and the DenyFactory.unregisterProtocol method is called when the socket is closed, but I have no way (that I can figure out) how to access the resource created in the ConsoleMessageDelivery instance that's being destroyed. I tried a del () method in ConsoleMessageDelivery but that's never called. What's the

Is there a Python MTA (Mail transfer agent)

时光毁灭记忆、已成空白 提交于 2019-11-30 13:26:48
问题 Just wondering if there is a Python MTA. I took a look at smtpd but they all look like forwarders without any functionality. 回答1: 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. 回答2: If you're looking for a full MTA solution you should check out http://slimta.org/ or as previously