> Hi Rian, Useful start: you seem to have dealt with the core SMTP stuff:-)
> I like how the code is done. I am not sure a hook for each smtp command > is the good solution. Adding a new command here is very simple and quick. That's my feeling too. But I'm happy with the way Rian has done it - and Jem was IIRC in favour of the same approach. > the problem i found when i did my poc is when there is in the command, > different destination email. It's difficult here to keep the virtualHost > scheme. > It would be nice to keep a conf file like > > <virtualHost> > ServerName mail.bla.com > SmtpUserMap mail.bla.com-user.map > or SmtpRelay host > .... > </virtualHost> Yes. I think there is a logical difficulty here. smtpd_create_request is run before process_smtp_connection_internal, and the design doesn't allow for multiple recipients to be processed differently. My own feeling was that multiple recipients require a request each. Maybe we could get that in your design by creating a subrequest for each RCPT TO? We should also deal with spooling. Maybe a protocol-level input filter can do that. I still like the idea of a spool bucket (being a long-life file bucket with crash/recovery capabilities and reference counting), in which case the input filter would simply convert everything to that. That would then run before creating any subrequests. -- Nick Kew
