[Twisted-Python] Mail Server

Jp Calderone exarkun at intarweb.us
Fri Jul 25 16:39:03 EDT 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.


    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='')
    reactor.listenTCP(110, pop3, interface='')



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 : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030725/b6e85da6/attachment.pgp 

More information about the Twisted-Python mailing list