personal rules
Ned Boddie
nboddie at MY-NETWORK.COM
Mon Oct 20 16:10:01 IST 2003
Here's how I did it.
1. In MailScanner.conf set the following two variables as follows:
Is Definitely Not Spam = &ByDomainSpamWhitelist
and
Is Definitely Spam = &ByDomainSpamBlacklist
These two routines are in the
/usr/lib/MailScanner/MailScanner/CustomConfig.pm file
on my system. There's also just a tad of doc in there about doing this.
I use the default paths in the 'my $WhitelistDir & my &BlacklistDir'
variables in that module. These directories will contain the by user
white and blacklist files,
2. Make the appropriate directories wherever you need. I set the owner to
root and the group to apache on my system since I also have a php web page
for my users to manage their own white and black lists so I don't have to
mess with it :)
3. Along with the blacklist & whitelist directories I also made a 3rd
directory at the same level that I call 'prefs'. This 3rd directory
contains both of the actual black * whitelist files by username, and then
I create symlink files from the actual lists into either the black or
whitelist subdirs as necessary.
Why do this indirection?
My users are actually emailable by a few different domains, i.e. x at a.com
and x at b.org, etc. along with some entries in the sendmail virtuser table
aliasing them to other names (married vs maiden names, etc.), so this way
I only have to have the user management web page maintain a single
black/white list combo that applies to ALL of their destination email
addresses.
4. The filenames in the prefs subdir, by my convention, are <final
sendmail user resolution name>.<blacklist | whitelist>, and then the
symlinks into the white/blacklist creates a name <emailaddress>.<blacklist
| whitelist>
Example:
The files in the /etc/MailScanner/spam.bydomain/prefs are all owned by the
apache.apache user and group since they are all maintained by the web
page. They are all chmodded to 0666.
/etc/MailScanner/spam.bydomain/prefs contains:
ned.blacklist
ned.whitelist
bob.blacklist
bob.blacklist
.
.
.
The symlinks in the black & whitelist directories are all owned by the
root.root user.group since only MailScanner has to deal with them, They
are all 777.
/etc/MailScanner/spam.bydomain/whitelist contains:
symlink from /etc/MailScanner/spam.bydomain/prefs/ned.whitelist -> ned at a.com
symlink from /etc/MailScanner/spam.bydomain/prefs/ned.whitelist ->
neddy at a.com (an allowed alias from the sendmail virtuser table)
symlink from /etc/MailScanner/spam.bydomain/prefs/bob.whitelist -> bob at a.com
.
.
.
and /etc/MailScanner/spam.bydomain/blacklist contains:
symlink from /etc/MailScanner/spam.bydomain/prefs/ned.blacklist -> ned at a.com
symlink from /etc/MailScanner/spam.bydomain/prefs/ned.blacklist ->
neddy at a.com (an allowed alias from the sendmail virtuser table)
symlink from /etc/MailScanner/spam.bydomain/prefs/bob.blacklist -> bob at a.com
.
.
.
If you care about the web page stuff I'll get around to packaging it up,
but at least from the MailScanner perpective you can do it this way.
Regards,
Ned
> Hi,
>
> Is it possible to personnalize blacklists or whitelists, like if
> user at domain.com doesn't want to receive e-mail from
> user at domain2.com, but user2 at domain.com wants to receive mail from
> user at domain2.com?
>
> thanks,
> --------------
> Ugo Bellavance
> Camo-route Inc.
> ugob at camo-route.com
>
More information about the MailScanner
mailing list