Re: user defined rules

From: Bjarni R. Einarsson (
Date: Fim 18 Jan 2001 - 11:26:48 UTC

(This is in reply to a post to anomy-bugs, but is much more appropriate
 for anomy-list, so I'm following up there.)

On 2001-01-18, 11:47:40 (+0100), hendrik.mestenhauser wrote:
> Hello,
> i have download your programm and studied the manual.
> so i have an question for the functionality:
> Can i add user based rules? For instance block
> all exe-attachments for users from a special
> department and allow to send for administrators?

There is no support built into the sanitizer for this, but if you
are using procmail and delivering to local mailboxes there is no
reason you couldn't invoke the sanitizer with different configuration
files for each user.

For example, in /etc/procmailrc, you might use something like this:

  :0 fw
  |/path/to/anomy/bin/ /path/to/default.cfg /path/to/user-$LOGNAME.cfg

This will make the sanitizer first load a default configuration, and
then a user-<username>.cfg file which can override the default.

The only drawback here is that you must create a user-<username>.cfg
file for every single user in your system (an empty file is enough), or
the sanitizer will panic. I suppose I could change that in the future,
or you could work around the problem with a conditional procmail rule
which checks for the existance of the file before executing that

Doing this on a mail-hub for in-transit mail is quite a bit more
complicated (how to handle messages addressed to multiple receipients,
each of which has a different configuration?), and is (for now) left as
an excersize for the reader. :-) To be completely honest though, I feel
I should mention that this feature is pretty high on the TODO list for
the "professional" version I'll be developing at my new job. Whether
I'll be able to release it under the GPL is unknown at this time (it
will be handled by a seperate program).

Bjarni R. Einarsson                           PGP: 02764305, B7A3AB89                -><-    

Check out my open-source email sanitizer:

-- This mailing list's home page is: There you can find subscription instructions and possibly an archive. is a free Icelandic mailing list service.

hosted by