Hi Jim,I prefer to check for valid recipients by calling a program rather than looking up a table. One of my domain demands this because it allows users to create their own email aliases which are then validated based on regexp matching.
FWIW I have attached a set of scripts I created for my server's somewhat unusual requirements.
There is a plugin that invokes external scripts based on which domain the recipient is in. Most of my domains are vanilla vpopmail domains. Some are weird legacy domains with their own unique requirements. Hence I designed the plugin to farm out the actual checking to external scripts. Also, to look inside vpopmail's structure the script has to run as the vpomail UID so I preferred to use an external script and an suid wrapper to make the privilege separation as simple and unambiguous as possible.
Obvious enhancements would be to make the plugin aware of the virtualdomains and qmail users control files so it knows exactly where to look for vpop domains and alias domains. to accommodate other domains (such as my setup) it would also need to refer to its own table in the config directory where you could specify other scripts for the non-vpop domains or overrides/exceptions etc.
Anyway, here's something to start with. Make sure you send me any enhancements.
Good Luck! Charles
recipient_exists.pl
Description: Binary data
/* * $Header: /var/smtpd/local/src/RCS/vpop_rcpt_check_suid_wrapper.c,v 1.1 2006/08/12 02:18:16 root Exp $ */ #include <stdlib.h> #define VPOP_RCPT_CHECK "/var/smtpd/local/bin/vpop_rcpt_check" int main() { execl(VPOP_RCPT_CHECK, (char *)0); return 1; }
vpop_rcpt_check.pl
Description: Binary data
On 02/02/2007, at 10:06, Jim Murray wrote:
Firstly, apologies if this question's been asked a hundred times alreadybut I'm new to qpsmtpd (having just switched from qmail-smtpd to gain improved filtering capabilities) and can't find a definitive answer either in Google or the list archives. What I'm looking for is a way to reject mail for invalid users during the SMTP transaction. I can't find a plugin that will do it withoutcreating a database of valid users and supports vpopmail virtual domains.If anyone knows of such a thing could they please give me a pointer towards it so I don't end up reinventing the wheel. If not, I understand there was a file (plugin?) at one point called dot-qmail-exists but I can't find it anywhere. If anyone could point metowards that it would be helpful as a starting point for further work tobuild what I need. Thanks, Jim. -- DigitalDaemons IT Services. --------------------------------------- E-Mail : [EMAIL PROTECTED] PGP Key ID : 0xB7066495