[Twisted-Python] Help with SMTP Proxy - correction

Eugene Coetzee projects at reedflute.com
Sat Apr 23 04:38:18 MDT 2005


Eugene Coetzee wrote:

>>
>>      smtpServerFactory = ESMTPFactory()
>> smtpClientFactory = SMTPClientFactory()
>> smtpServerService = internet.TCPServer(2025, smtpServerFactory)
>> smtpServerService.setServiceParent(application)
>>
>> I've left out actually forwarding the message for now, I just want to 
>> forward a test e-mail upon receipt of the message. The whole 
>> structure of this program doesn't seem right to me. I thought 
>> initially of trying something like adding this to the eomReceived 
>> method:
>>
>> smtpForwardService = internet.TCPClient('localhost', 2030, 
>> smtpClientFactory)
>> smtpForwardService.setServiceParent(application)
>>
> This is how I'm doing it.
>
> http://twistedmatrix.com/pipermail/twisted-python/2005-March/009888.html
>
> Conductor instance registers a reference to both smtpServerService  
> instance and smtpForwardService instance.
>
> I would call something like conductor.write(destination) from within 
> the smtpServerService instance which would in turn  call  a method on 
> the reference to smtpForwardService from within conductor.
>
<snip>
Conductor instance registers a reference to both smtpServerService  
instance and smtpForwardService instance.

I would call something like conductor.write(destination) from within the 
smtpServerService instance which would in turn  call  a method on the 
reference to smtpForwardService from within conductor.

</snip>

should in fact read ...

Conductor instance registers a reference to both smtpServerFactory  
instance and smtpClientFactory instance.

I would call something like conductor.write(destination) from within the 
smtpServer instance which would in turn  call  a method on the reference 
to smtpClientFactory from within conductor.

Sorry about that.

-- 
--
===============================================
Reedflute Software Solutions

Telephone           -> +27 18 293 3236
General information -> info at reedflute.com
Project information -> projects at reedflute.com
Web                 -> www.reedflute.com
=============================================== 





More information about the Twisted-Python mailing list