You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/09/16 18:35:34 UTC
Re: Creating a custom tag via a plugin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm pretty sure there's a bugzilla bug open about this... I can't find it
though. Could you open a bug at http://bugzilla.spamassassin.org/
to request it?
- --j.
Brian Keifer writes:
> I'm using SpamAssassin 3.0 RC5 to tag messages according to per-user
> preferences specified in an SQL database. Users have the ability to
> modify their settings in the database via a web-based application
> (Sam, part of the Horde project). One of the settings is
> required_hits. If the message gets tagged as spam, a maildrop script
> delivers the message to the user's "SPAM" mailbox. If it's not spam,
> it gets delivered normally.
>
> I'd like to add a second value, specified by the user and stored in
> the same table as all of the other SA prefs. This would be a second,
> higher, score that I'd like to have inserted as a second header into
> each message marked as spam. Maildrop would then compare the value of
> this new header to the number of hits the message got. If the number
> of hits is greater than this second threshold, the maildrop script
> will delete the message without delivering it. I'd envisioned the
> second header appearing something like this:
>
> X-Spam-Delete: 9.3
>
> In this situation, any messages that got a score of 9.3 or greater
> would never make it to the user's mailbox.
>
> I've found the add_header option but naturally none of the _TAGS_
> reference my custom value. What I'd like to know is if there's a way
> to create an additional tag via a SA 3.0 plugin. Failing that, is
> there a way to take an arbitrary value from SA's config table and
> inject it into a header?
>
> Thanks in advance,
>
> -Brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFBScDWQTcbUG5Y7woRAnIeAKDsLPg4pjaRd/ma/kJhx9tD48RJGgCcDMU+
9VwCUrZUwxo4roX/jlTfc3o=
=lVBl
-----END PGP SIGNATURE-----
Re: Creating a custom tag via a plugin
Posted by Michael Parker <pa...@pobox.com>.
On Thu, Sep 16, 2004 at 09:35:34AM -0700, Justin Mason wrote:
>
>
> I'm pretty sure there's a bugzilla bug open about this... I can't find it
> though. Could you open a bug at http://bugzilla.spamassassin.org/
> to request it?
>
Turns out it's easy enough to do, but it might be cool to add a hook
that gets called in _get_tag and passes in the %tags hash so you can
stick things in there. Or something similar.
Michael