Re: Action hook upon releasing/confirmation/deletion/whitelisting/blacklisting

Lloyd Zusman <[email protected]>
Newsgroups gmane.mail.spam.tmda.user,gmane.mail.spam.tmda.devel
Message-ID <[email protected]>
Lloyd Zusman <[email protected]> writes:

> Ages ago (well, back in March and April), I discussed and wrote a patch
> for TMDA that would allow us to install hooks that can be invoked upon
> releasing, confirming, deleting, whitelisting, or blacklisting messages.
>
> I posted an early release of this here for comments and discussion, and
> since then, I've been regularly using a somewhat debugged version of the
> same thing.  I use it to feed rejected and accepted messages to a
> bayesian spam/non-spam learning procedure.
>
> It's been working fine, and I recently realized that I never followed
> through on posting a final version.  So, here I am with it, requesting
> that it be evaluated and (hopefully) applied to the TMDA code base.

Any thoughts on this patch?  Is there any way it might get incorporated
into the TMDA code base?


> With this patch we can install any of the following hooks:
>
>   PENDING_RELEASE_ACTION_HOOK
>   PENDING_CONFIRM_ACTION_HOOK
>   PENDING_DELETE_ACTION_HOOK
>   PENDING_WHITELIST_ACTION_HOOK
>   PENDING_BLACKLIST_ACTION_HOOK
>
> In each case, these contain the full path name of an executable that
> will be invoked for each message that is released, confirmed, deleted,
> whitelisted, and blacklisted, respectively.  For all of these which are
> not set to None, the specified hook executable will be invoked as
> follows:
>
>   /path/to/hook message-file
>
> ... where "message-file" is the pathname of the message file in the TMDA
> pending directory.  Also, before this hook is invoked, all the variables
> defined in Defaults.py, /etc/tmdarc, and your local .tmda file are put
> into the environment, so they can be accessed easily within the hook
> program.
>
> Anyway, here's the patch.  It works against tmda-1.1.11 (am I out of
> date?).
>
> (by the way, this patch also contains try/except blocks around the
> invocations of "Util.headers_as_raw_string" and
> "Util.body_as_raw_string" in tmda-rfilter, but I don't recall why I did
> that ... maybe because some messages had content which blew up
> tmda-rfilter ... ???)
>
>
> [ ... patch deleted to save bandwidth ... ]

-- 
 Lloyd Zusman
 [email protected]
 God bless you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.