[Twisted-Python] Mail Server
Jp Calderone
exarkun at intarweb.us
Fri Jul 25 14:39:03 MDT 2003
On Fri, Jul 25, 2003 at 04:22:34PM -0400, David A. Leedom wrote:
> Andrew,
>
> The problem is that I don't quite "get" Twisted yet. The output from TAP
> does not seem to do it for me. I need a step by step quick and dirty
> example. Even if someone could tease out the python short-hand that the
> TAP puts out, that would help.
Untested:
from twisted.internet import reactor
from twisted import mail
import twisted.mail.mail
import twisted.mail.maildir
service = mail.mail.MailService('ExampleMail')
smtp = service.getSMTPFactory()
pop3 = service.getPOP3Factory()
domain = mail.maildir.MaildirDirdbmDomain(service, '/path/to/domain')
domain.addUser('username', 'password')
svc.addDomain('domain.name', domain)
reactor.listenTCP(25, smtp, interface='127.0.0.1')
reactor.listenTCP(110, pop3, interface='127.0.0.1')
reactor.run()
Jp
--
No, `Eureka' is Greek for `This bath is too hot.'
-- Dr. Who
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20030725/b6e85da6/attachment.sig>
More information about the Twisted-Python
mailing list