Hello,
Well, I'll fix that tonight. I didn't notice that the LMTP module used the SMTP server... I'll probably be refactor some other things in the SMTP.Server sections within the next weeks or so.
The problem is fixed already.
My aim is to replace my current mailer with a pike-based SMTP server with (at least) the same functionality. To do this, I will attempt to rewrite the SMTP.Server into allowing pluggable modules which can provide SMTP-commands and extentions. Any thoughts on how this should be done the right way, is apprciated.
I made Protocols.SMTP.Server only because I needed Protocols.LMTP.Server but I think it's better to use your own LMTP server than making your own SMTP server. Making yourself a SMTP server is more difficult because you have to cope with other servers which doesn't respect the RFC and break rules and so I think it's better to use an existing software that already did that. LMTP is better IMHO since you can use a well tested SMTP server for speaking to the outside world and still get lot of control other your mail.
About plugin extentions, it already provide a sort of pluggin through the commmands mapping. The stuff is made in launch_functions() and the commands mapping which given a smtp command of the client (mail from: toto@toto.com for example) start the function mail(string argument) with argument = "from: toto@toto.com" using the entry ([ "mail": mail ]) in the commands mapping. All you have to do to extend it is inheriting Protocols.SMTP.Server and changing this mapping to your functions (this is what the LMTP server do).
BTW if you were to changed some parts in Protocols.SMTP you might want to take a look at Procotols.ESMTP.client in Caudium CVS.
Btw, what is the syntax of the SMTP.Server module in 7.4? Some comments in the code makes me suspect that it is not used the same way as in 7.5...
The server is not available in 7.4.
/ David Gourdelier