Jem Berkes wrote:
Is this the right way or is there an example module I could compare
with?


I noticed a couple posts about examples, there is now one as I have committed all the RBL stuff I wrote. See:

https://svn.apache.org/repos/asf/httpd/mod_smtpd/trunk/mod_smtpd_rbl/

This hooks into mod_smtpd in two places and returns various data (e.g. if the client IP is blacklisted then mod_smtpd is told to deny mail). I hope it serves as a good example, it seems to work quite nicely to give mod_smtpd all the DNSBL/RHSBL features in a modular fashion.

Since the commit mail hasn't come through yet (needs to be approved I imagine) I'll just comment here...

First off, you've got a bunch of files in there that are marked as executable that shouldn't.

Second, you checked in some generated files (Makefile, for example, in mod_smtpd_rbl).

Third, you added a copy of mod_smtpd.h in the mod_smtpd_rbl directory, if that file is needed you should be using mod_smtpd's copy of it, not a local one.

For long function pointer types like the dnsbl_domain function in check_envelope you really might want to make it a separate typedef, as the long type as part of the declaration is kind of hard to read.

A lot of the lines are really long, they should wrap at 80 columns.

In check_envelope you have some spots with 4 space indenting and some with 8. This is kind of weird.

The copyright at the top of the files should be "Copyright 2005 The Apache Software Foundation or its licensors, as applicable", not you, like the rest of the mod_smtpd files...

Other than that, looks pretty cool. Thanks for including a README, and for giving everyone an example of what mod_smtpd can be made to do ;-)

-garrett

Reply via email to