Say you want to add a new back end called blackbox. For filtering incoming mail, provide the following:
(defvar spam-use-blackbox nil "True if blackbox should be used.")
spam-check-blackbox if Blackbox can check incoming mail.
spam-blackbox-unregister-routine using the bogofilter
register/unregister routines as a start, or other register/unregister
routines more appropriate to Blackbox, if Blackbox can
register/unregister spam and ham.
spam-check-blackbox function should return ‘nil’ or
spam-split-group, observing the other conventions. See the
spam-check-* functions for examples of what you can
do, and stick to the template unless you fully understand the reasons
why you aren’t.
For processing spam and ham messages, provide the following:
Note you don’t have to provide a spam or a ham processor. Only provide them if Blackbox supports spam or ham processing.
Also, ham and spam processors are being phased out as single
variables. Instead the form
(spam spam-use-blackbox) or
(ham spam-use-blackbox) is favored. For now, spam/ham
processor variables are still around but they won’t be for long.
(defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam" "The Blackbox summary exit spam processor. Only applicable to spam groups.") (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham" "The whitelist summary exit ham processor. Only applicable to non-spam (unclassified and ham) groups.")
(const :tag "Spam: Blackbox" (spam spam-use-blackbox)) (const :tag "Ham: Blackbox" (ham spam-use-blackbox))
spam-process group parameter in
sure you do it twice, once for the parameter and once for the
spam-autodetect-methods group parameter in
gnus.el if Blackbox can check incoming mail for spam contents.
Finally, use the appropriate
spam-install-*-backend function in
spam.el. Here are the available functions.
This function will simply install an alias for a back end that does
everything like the original back end. It is currently only used to
spam-use-BBDB-exclusive act like
This function installs a back end that has no check function, but can
register/unregister ham or spam. The
spam-use-gmane back end is
such a back end.
This function will install a back end that can only check incoming mail
for spam contents. It can’t register or unregister messages.
spam-use-hashcash are such
This function installs a statistical back end (one which requires the
full body of a message to check it) that can only check incoming mail
spam-use-regex-body is such a filter.
This function install a statistical back end with incoming checks and
set up this way.
This is the most normal back end installation, where a back end that can
check and register/unregister messages is set up without statistical
spam-use-BBDB is such a back end.
Mover back ends are internal to
spam.el and specifically move
articles around when the summary is exited. You will very probably
never install such a back end.