Bug 4501 - Import blacklists/whitelists from referenced external files
Summary: Import blacklists/whitelists from referenced external files
Status: NEW
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Libraries (show other bugs)
Version: 3.0.3
Hardware: All All
: P5 enhancement
Target Milestone: Future
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 12:05 UTC by Magnus Holmgren
Modified: 2011-08-15 04:31 UTC (History)
1 user (show)



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Holmgren 2005-07-25 12:05:25 UTC
I would like to tell SA to read addresses to add to blacklist_to, whitelist_from
etc. from a separate file, like this:

blacklist_from file:/etc/mail/blacklist

This file would be a standard simple one-item-per-line file, with # denoting
comments. The reason that the existing include mechanism isn't sufficient is
that I want to share this file with other programs, which don't understand SA's
keywords. (More specifically, I want to put spamtrap addresses in the file. The
file would then be used to fetch addresses to put on webpages as well as to
control the MTA and SA.)

This could of course be generalised in two ways: 1) By adding more import
mechanisms such as "db:" and "http:" in addition to plain text files, and 2) by
allowing it in other places, such as rules.

I guess that I could accomplish my specific goal by writing a plugin, but what
do you say, have this been discussed?
Comment 1 Theo Van Dinter 2005-07-25 12:22:09 UTC
Subject: Re:   New: Import blacklists/whitelists from referenced external files

On Mon, Jul 25, 2005 at 12:05:26PM -0700, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> I guess that I could accomplish my specific goal by writing a plugin, but what
> do you say, have this been discussed?

My first thought is that it sounds like a modification/addition to the
accessdb eval/plugin.

Comment 2 Bob Menschel 2005-07-25 21:21:30 UTC
It would seem to me that the easiest solution, which will allow you to 
> share this file with other programs, which don't understand SA's keywords, 
is to create your own external file, in whatever format you want, and have your
own program which regularly passes the file generating output for each program
that needs this data (SA being only one of them).  

Then, if your /etc/mail/blacklist file contains entries like uid@example.com,
*@example2.com, uid@example3.*, you simply read this file in, and create the
corresponding blacklist_from entries in /etc/spamassassin/myblacklist.cf,
repeating this process daily or weekly or whenever you want. 

Unless others have similar need (and I don't remember such a desire being
discussed in the past year or so), then it seems this is a much more efficient
solution for you (and will happen faster than waiting for devs to figure out how
to do something generalized). 
Comment 3 Justin Mason 2005-07-26 11:30:18 UTC
Looks like the AccessDB plugin does more-or-less exactly this.  this would
definitely be best implemented as a patch to that plugin.
Comment 4 jidanni 2011-08-15 04:31:45 UTC
Remember that basic users wish to have names associated with
addresses. That's how they appear in any mail system.
whitelist_from with its monolithic blob of addresses makes it hard for
the user to remember who is who. Therefore the
Mail::SpamAssassin::Conf should say how the basic user can have a list like
Bob Holmes <bh@example.com>
Will Thrill <wt@example.org>
etc.