httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jem Berkes <>
Subject Re: mod_smtpd design.
Date Fri, 15 Jul 2005 01:43:13 GMT
> 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
> framework - c.f. proxy_http and proxy_ftp.  These are clearly

That makes more sense than the route I was going

> Have you done any research on available code for handling the protocol?

I will do more along those lines. The only SMTP package I am familiar with 
is Postfix, but I think we encountered a licensing issue in earlier 
discussion. If the protocol handling has to be redone from scratch, I am 
willing to work on that.

> That's basically a similar task to CGI, and a first pass at that
> would be to try running procmail under CGI (with incoming HTTP POST
> or PUT requests will do fine).  I imagine that would be a pretty
> trivial job with perl or python.

Attached is a quick demo that allows mail delivery via CGI (HTTP POST).
cat raw-email-message | curl -s --data-binary @- http://.../cgi-procmail

It works on my Linux and FreeBSD system. It's hard coded to deliver to the 
current user only (web server user) but procmail runs suid root so you 
could deliver to other users too.

> Now look at what you needed to do.  That's a first-pass spec for
> this task.  It should be a fairly straightforward mod to mod_cgi(d).
> I'm not sure whether that's the best approach, but hacking it up
> will surely throw some light on the matter.

I don't quite understand this... are you saying that instead of an 
external CGI program (as attached), the pipe to procmail functionality 
should be a server module?

View raw message