Learning upon release/deletion/expiration with tmda and tmda-cgi

Lloyd Zusman <[email protected]>
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
I'm using both crm114[*] and tmda in the following manner:

1.  An incoming message gets filtered through crm114.  Based on this,
    one of the following headers gets added to the message:

      X-CRM114-Status: SPAM         definitely spam
      X-CRM114-Status: GOOD         definitely non-spam
      X-CRM114-Status: UNSURE       not sure

2.  The message then gets routed through tmda.  Based on my filter
    rules, the following occurs:

      if status == SPAM then
        store message in my "Spam" folder
      else if status == GOOD then
        release message to my default INBOX
      else (status == UNSURE)
        if sender has been previously confirmed then
          *** learn message as non-spam
          release message to my default INBOX
        else
          send out confirmation request
        endif
      endif

Note the line flagged with "***".  This involves piping the message
through one of the crm114 utilities in order to cause it to be "learned"
as non-spam.  Is there a way to cause this learning to automatically
occur without my hacking the source code of tmda?

Also, want to do more learning under three other cases.  Each of these
applies to messages in the pending queue; i.e., those which were
previously marked as UNSURE by crm114:

A.  The message has been sitting in the pending queue for the
    PENDING_LIFETIME, and it is about to be automatically expired and
    deleted.  During this automatic expiration process, I'd like it to
    be learned as spam by crm114.

B.  Via tmda-cgi, I am manually deciding to release a pending message.
    Therefore, I'd like it to be passed through the crm114 utility and
    learned as non-spam as it's being released.

C.  Via tmda-cgi, I am manually deciding to delete a pending message.
    Therefore, I'd like it to be passed through the crm114 utility and
    learned as spam as it's being deleted.

Are there any hooks in tmda and tmda-cgi that I can use for performing
the "***" item above as well as items A, B, and C ... without my having
to hack the source code of tmda or tmda-cgi?

Thanks in advance.

[*] http://crm114.sourceforge.net

-- 
 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.