httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rian Hunter <r...@MIT.EDU>
Subject New mod_smtpd release
Date Sat, 13 Aug 2005 00:57:29 GMT
Hi,

I've checked in mod_smtpd 0.9 and its API should be completely frozen  
by now. This version of mod_smtpd is heavily based on Qpsmtpd, so the  
same extensibility you expect from Qpsmtpd can be achieved with this  
version of mod_smtpd. I haven't written any documentation yet but  
here is a quick run-down of how to use it:

In your httpd.conf, make sure you have SmtpProtocol On, if you are  
setting up a virtualhost make sure the virtualHost container has the  
ServerName directive (duh).

This version of mod_smtpd is callback based, very similar to Qpsmtpd.  
Here is a list of all the hooks you can register:

smtpd_run_unrecognized_command
smtpd_run_connect
smtpd_run_reset_transaction
smtpd_run_helo
smtpd_run_ehlo
smtpd_run_mail
smtpd_run_rcpt
smtpd_run_vrfy
smtpd_run_quit
smtpd_run_data
smtpd_run_data_post
smtpd_run_data_queue

You can register a hook to one of these by calling:

APR_OPTIONAL_HOOK(smtpd, /* hook name */ vrfy, /* function address */  
default_vrfy, NULL, NULL, APR_HOOK_FIRST);

In your register hooks function. Each hook you register should return  
smtpd_retcode, to see what retcodes make sense for each callback you  
should look at smtp_protocol.c until I write better documentation. To  
see what argument each different type of hook takes look at smtp_core.c.

The code is very small and simple and shouldn't be too hard to figure  
out if you're familiar with apache modules. Currently it works with  
httpd 2.0 and up.

You can checkout this code out from:
http://svn.apache.org/repos/asf/httpd/mod_smtpd/trunk/

Have Fun!
-rian


Mime
View raw message