Not without doing some source code hacking of qmailadmin and/or the vpopmail programs (of course, I don't know qmailadmin very well, so there might be an option to run other programs at create-time, which would allow you to run a shell script or something to create it, but I doubt that such a feature exists).
You can do domain-level filtering because of the way vpopmail works. You just use this in the .qmail-default file (I'd suggest with the -S option, and use it as a 'stop processing' usage, rather using -X and -C). This can be effective if you're not worried about false-positives thrown out with the trash (so, I don't really recommend using it in this way :)) Example .qmail-default: -------------- # drop mail if its spam | /usr/local/vpopmail/bin/spam-filter.pl -S # if it gets this far, its non-spam # so just allow vpopmail to do its thing | /usr/local/vpopmail/bin/vdelivermail '' bounce-no-mailbox -------------- Also note that I said this was not designed for production. I mean, I believe its stable, but the pure overhead of starting up the perl script on each incoming email (because of the time it takes Mail::SpamAssassin to load) can be quite high, and you need to be sure you're server can handle it (my p3 GHz w/ 512mb takes about 1-3 second to do it all, so that I can live with. One of my development machines, an old p2 200 w/128mb takes about 8-12 seconds to run it, and 90% cpu usage -- that's something you can't have on a production box... But then again, that's a pretty weak 'production' box if it was one). This is the same problem users that use the 'spamassassin' command line program have (and qmail-scanner too, though perhaps to a lesser extent, because Mail::SpamAssassin is what takes so long to load). The spamassassin people 'solved' this problem by creating the spamd/spamc combo, spamd is the 'spamassassin' command line program, but it goes into daemon mode and runs all the time. Then spamc is a C program that essentially pipes the incoming mail to the already-running spamd and reads back the results. The likely way I'll solve my problem is that I'll allow their spamd to run in daemon mode, but then I'll use spam-filter.pl to connect to it and send it data, rather then spamc. We'll see, maybe I'll look into that solution later today. P.S., glad you enjoy it. I'm quite glad to have it, because my spam to real-mail ratio is about 100:1 (I know, very sad... Had the email account for years) Jon Coulter [EMAIL PROTECTED] -----Original Message----- From: Jeff Koch [mailto:[EMAIL PROTECTED]] Sent: Monday, August 26, 2002 9:35 AM To: Jon Coulter Cc: [EMAIL PROTECTED] Subject: Re: [vchkpw] Vpopmail/qmail spam filter using SpamAssassin (and other stuff) Hi Jon: This is wonderful. The options you've added are great. One question. Is there a way to automatically setup the .qmail-<user> file whenever qmailadmin adds a new user? Best Regards, Jeff Koch Intersessions.com -------------------------------------------------- On Mon, 26 Aug 2002, Jon Coulter wrote: > Out of my pure hatred for spam, love for qmail/vpopmail/perl, and > dislike of the complexity of all current 'spam filtering' > implementations for qmail (and/or vpopmail), I decided to write my own > perl app to do all the things I wanted (and more) when filtering > email. > > http://www.ledscripts.com/dev/vpopmail-spam-filter.html > --- snip ---