Re: mod_smtpd design - protocol

2005-07-17 Thread Nick Kew
On Sat, 16 Jul 2005, Jem Berkes wrote: I want to focus a bit on mod_smtpd design, in particular the protocol module (which accepts connections and does the E/SMTP talking). I've seen various ideas thrown around on what exactly the module should do. It would be nice if we could come up

Re: mod_smtpd design - protocol

2005-07-17 Thread Joe Schaefer
Jem Berkes [EMAIL PROTECTED] writes: The competing technology seems to be Sendmail's milter interface which allows developers to hook their custom filters into various stages of SMTP transactions. If you follow the design of httpd, then you want to create an smtp_in filter that removes any

mod_smtpd design - protocol

2005-07-16 Thread Jem Berkes
I want to focus a bit on mod_smtpd design, in particular the protocol module (which accepts connections and does the E/SMTP talking). I've seen various ideas thrown around on what exactly the module should do. It would be nice if we could come up with at least the high level design specs

Re: mod_smtpd design - protocol

2005-07-16 Thread Joe Schaefer
Jem Berkes [EMAIL PROTECTED] writes: I think this granularity is required. But I'm not sure about how the DATA hook would work? Have you considered using libapreq2 for parsing the mime headers in there? The header parser should really convenient for that, you could even introduce a

Re: mod_smtpd design - protocol

2005-07-16 Thread Joe Schaefer
Joe Schaefer [EMAIL PROTECTED] writes: Jem Berkes [EMAIL PROTECTED] writes: I think this granularity is required. But I'm not sure about how the DATA hook would work? Have you considered using libapreq2 for parsing the mime headers in there? The header parser should really convenient

Re: mod_smtpd design - protocol

2005-07-16 Thread Jem Berkes
Have you considered using libapreq2 for parsing the mime headers in there? The header parser should really convenient for that, you could even introduce a post-header-parser hook that runs when the parser finishes. My own suggestion is that we don't touch or try to interpret MIME. Parsing

Re: mod_smtpd design - protocol

2005-07-16 Thread Joe Schaefer
Jem Berkes [EMAIL PROTECTED] writes: Have you considered using libapreq2 for parsing the mime headers in there? The header parser should really convenient for that, you could even introduce a post-header-parser hook that runs when the parser finishes. My own suggestion is that we don't

Re: mod_smtpd design.

2005-07-14 Thread Jem Berkes
I'd like to see more of you on IRC:-) OK, I'm regularly logging onto #apache-modules now SMTP is two tasks: accept incoming connections (a protocol module - c.f. the ftp modules), and make outgoing connections to another server. The latter would be a proxy_smtp module in the mod_proxy

Re: mod_smtpd design.

2005-07-11 Thread Jem Berkes
Where are we in the mod_smtpd design/task allocation? Since there are several people involved we're really going to have to divide up the tasks and at least decide on how our various modules will communicate. I'd like to start coding, if one of the mentors could push me in the direction

Re: mod_smtpd design.

2005-07-11 Thread Joey Ekstrom
On 7/11/05, Jem Berkes [EMAIL PROTECTED] wrote: As I understand it, we want to produce one module that deals with the SMTP protocol, and a separate module to handle mail delivery (probably via procmail is easiest for now). Does this mean we should also produce separate modules, one for

Re: mod_smtpd design.

2005-07-11 Thread Nick Kew
Jem Berkes wrote: Where are we in the mod_smtpd design/task allocation? Since there are several people involved we're really going to have to divide up the tasks and at least decide on how our various modules will communicate. I'd like to start coding, if one of the mentors could push me

Re: mod_smtpd design.

2005-07-04 Thread Nick Kew
Jem Berkes wrote: Nick, in one of the background docs you sent me [aside: that's the material to be used for the ApacheCon tutorial, and work-in-progress on the book] the 'connection filters' were described as operating outside the scope of HTTP or any request_rec. Indeed. An HTTP

Re: mod_smtpd design.

2005-07-03 Thread Jem Berkes
I don't see why it matters if there are redundant members in request_rec. However, for purity, it might be cool to divide request_rec up into common elements and protocol-specific stuff in a union. That's not really a problem, though of course it's hacky. It's the logical consequence

mod_smtpd design.

2005-07-01 Thread Rian Hunter
Hi, Currently there are two approaches we are looking at for mod_smtpd. We can use the existing request_rec structure, and store smtp specific data in a structure stucture in the r-request conf vector. With this we can reuse some of the existing core hooks that make sense (handler,

Re: mod_smtpd design.

2005-07-01 Thread Ben Laurie
Rian Hunter wrote: Hi, Currently there are two approaches we are looking at for mod_smtpd. We can use the existing request_rec structure, and store smtp specific data in a structure stucture in the r-request conf vector. With this we can reuse some of the existing core hooks that make sense

Re: mod_smtpd design.

2005-07-01 Thread Matthieu Estrade
I agree with you, but when i tried to do this in the module you can find in www.apache.org/~mestrade/ , i found many dependencies in some *http* files. request_rec is defined in httpd.h and i think it will not be clean to handle some smtp data in a file with a name containing http, that's why i

Re: mod_smtpd design.

2005-07-01 Thread Nick Kew
Ben Laurie wrote: I don't see why it matters if there are redundant members in request_rec. However, for purity, it might be cool to divide request_rec up into common elements and protocol-specific stuff in a union. That's not really a problem, though of course it's hacky. It's the logical

Re: mod_smtpd design.

2005-07-01 Thread Rian Hunter
Ben Laurie wrote: Another approach still would require a fairly large change to the core and many modules, but it strikes me as a better option... struct http_data { . . . }; struct smtp_data { . . . }; struct request_rec { . . /* common stuff */ .

Re: mod_smtpd design.

2005-07-01 Thread Garrett Rooney
Rian Hunter wrote: If there was going to be a large change to core, request_rec and friends how about: struct request_rec { /* common stuff */ char *protocol_name; // different from r-protocol, // but maybe doesn't have to be struct ap_conf_vector_t

Re: mod_smtpd design.

2005-07-01 Thread Rian A Hunter
Quoting Garrett Rooney [EMAIL PROTECTED]: Rian Hunter wrote: type misc_smtp_handler(request_rec *r) { smtpd_request_rec *smtp_data; if (strncmp(http, r-protocol_name, 4)) { // decline to handle, this module doesn't handle // http requests. } //then

Re: mod_smtpd design.

2005-07-01 Thread Nick Kew
On Friday 01 July 2005 16:34, Rian A Hunter wrote: Quoting Garrett Rooney [EMAIL PROTECTED]: Rian Hunter wrote: type misc_smtp_handler(request_rec *r) { smtpd_request_rec *smtp_data; if (strncmp(http, r-protocol_name, 4)) { // decline to handle, this module

Re: mod_smtpd design.

2005-07-01 Thread Nick Kew
On Friday 01 July 2005 16:47, Nick Kew wrote: On Friday 01 July 2005 16:34, Rian A Hunter wrote: Quoting Garrett Rooney [EMAIL PROTECTED]: Rian Hunter wrote: type misc_smtp_handler(request_rec *r) { smtpd_request_rec *smtp_data; if (strncmp(http, r-protocol_name, 4))

Re: mod_smtpd design.

2005-07-01 Thread Greg Marr
At 11:34 AM 7/1/2005, Rian A Hunter wrote: Quoting Garrett Rooney [EMAIL PROTECTED]: Rian Hunter wrote: type misc_smtp_handler(request_rec *r) { smtpd_request_rec *smtp_data; if (strncmp(http, r-protocol_name, 4)) { // decline to handle, this module doesn't handle