On Sun, 3 Feb 2008, James Turnbull wrote:

Does anyone use qpsmtpd with Mailman?  Is there a recommended way to do
recipient checking?  I use check_goodrcptto currently and can obviously
add the addresses for lists into its config but is there a better way or
does someone have a custom plug-in for this that they would be willing
to share?

I wrote a couple plugins to help me with this (and handling alias files nicely). Basically, there are a few pieces.

I have two plugins for determining whether or not the recipient is valid:

* note_local_recipient - this looks to see whether or not the recipient is valid by calling getpwnam($user) and then looking in the alias files. It's not all that smart, since it just looks at the user portion of the address, it doesn't really check that the domain matches (for aliases), but it's been helpful in turning away "random username" spam.

* note_mailman_recipient - looks to see if the recipient is a valid mailman address based on the lists I have on disk.

* require_connection_notes_key - this requires a key in $qp->connection()->notes(). The list of keys can be defined in the config, but in my case the valid keys are "local_recipient" or "mailman_list"

I'd actually like to see the connection notes thing integrated into qpsmtpd and other plugins, since it gives you a flexible way to write local plugins. The idea is that often you want to require any of 1 of N plugins to find a match to succeed. You can't do that in just one plugin, since the plugins which check a match cannot reject the mail right away.

Anyway, my qpsmtpd plugins are at https://svn.urth.org/svn/qpsmtpd-plugins/trunk


-dave

/*===================================================
VegGuide.Org                        www.BookIRead.com
Your guide to all that's veg.       My book blog
===================================================*/

Reply via email to