On Tuesday, July 8, 2003, at 09:12 AM, Benjamin Tomhave wrote:
Why is changing the .qmail-default file a bad thing? Why not setup
filtering for the whole domain in one move rather than having to setup
spam-filtering on a per-user basis? I want spam filtering on by default,
and I can't really accomplish that with per-user enable/disable without
modifying account creation processes, which would be a pain.

Here's something to keep in mind when changing .qmail-default. It's something I didn't realize for quite some time.


When delivering mail to say [EMAIL PROTECTED], qmail will use domains/domain.com/.qmail-user if it exists, and .qmail-default (and thus vdelivermail) won't be called at all.

In QmailAdmin 1.0.21, we stopped using aliases and replaced them with forwards, so instead of having qmail drop the message in a Maildir (without any processing of that user's .qmail file), it will get redelivered. So, if .qmail-user contains "&[EMAIL PROTECTED]", it will be requeued and qmail will use .qmail-default (and vdelivermail) since there isn't a domain.com/.qmail-user2 file to process.

(When I refer to qmail above, I guess I really mean qmail-local, the program responsible for local deliveries.)

vdelivermail was designed to check for a user directory, process its .qmail file (if present) and deliver the message to the Maildir. In an earlier release of qmailadmin, we had attempted to use vdelivermail in a user's .qmail file to blackhole messages (which was a very bad idea, since it would start another instance of vdelivermail that would process the .qmail file and result in an infinite loop).

We've since fixed that problem by not calling vdelivermail. We can't use a "#" in the .qmail file because current versions of vdelivermail can't handle comments in .qmail files. Ken will release a version of vdelivermail (that does handle comments) in vpopmail 5.3.21 any day now (he promised it would be out last Friday).

Now, in a way, this delivery system is good. qmail-local will handle mailing lists, auto-responders and aliases without touching .qmail-default, so the only time .qmail-default is called is when it's for a user on the system. Having SpamAssassin processing be a part of .qmail-default would be OK then.

I think Jeff Hedlund has done some great work with setting up QmailAdmin to have spam processing take place in the user's .qmail file, and give the user control of turning it on or off. On my system, I've been using qmail-spamc (part of the SpamAssassin distribution) as a pre-processor to qmail-queue and have been very happy with it. Other users might like to integrate SA into their .qmail-default file.

I'd really like to see these systems working toward using per-user prefs stored in MySQL (see <http://useast.spamassassin.org/dist/sql/README> for more information on that feature) and eventually adding an interface as an extension to the modify user page where users can update their personal settings (adding addresses to a whitelist or blacklist would be a good start).

--
Tom Collins
[EMAIL PROTECTED]
Visit sniffter.com for info on the Sniffter hand-held Network Tester




Reply via email to