SPAMMNG(1)

NAME
spammng - manage SpamAssassin's daemon and configuration files. Also, train Bayesian classifier base.

SYNOPSIS
spammng [argument] [options]

OPTIONS

-c|--enable-server-configs
    Enable server (or user) configs in filtering process (only useful with -e|--enable-mailname option or start argument)

-C|--enable-user-configs
    Enable user configs in filtering process (only useful with start argument)

-s|--sensitivity=number
    Set the of hits required before a mail is considered as spam

-m|--modify-header=string
    The subject lines of suspected spam will be tagged by this string

-M|--not-modify-header
    Do not tagging subject lines

-a|--add-to-whitelist=email_address_pattern[, email_address_pattern ...]
    Add an email pattern(s) to a whitelist

-A|--add-to-blacklist=email_address_pattern[, email_address_pattern ...]
    Add an email pattern(s) to a blacklist

-d|--del-from-whitelist=email_address_pattern[, email_address_pattern ...]
    Delete an email pattern(s) from a whitelist

-D|--del-from-blacklist=email_address_pattern[, email_address_pattern ...]
    Delete an email pattern(s) from a blacklist

-u|--add-to-unwhitelist=email_address_pattern[, email_address_pattern ...]
    Add an email pattern(s) to an unwhitelist

-U|--add-to-unblacklist=email_address_pattern[, email_address_pattern ...]
    Add an email pattern(s) to an unblacklist

-l|--del-from-unwhitelist=email_address_pattern[, email_address_pattern ...]
    Delete an email pattern(s) from an unwhitelist

-L|--del-from-unblacklist=email_address_pattern[, email_address_pattern ...]
    Delete an email pattern(s) from an unblacklist

-b|--bayes
    Train SpamAssassin's Bayesian classifier

-p|--spam=filename[, filename ...]
    Learn message(s) as spam (only useful with -b|--bayes option)

-h|--ham=filename[, filename ...]
    Learn message(s) as ham (non-spam, only useful with -b|--bayes option)

-f|--forget=filename[, filename ...]
    Forget message(s) (only useful with -b|--bayes option)

-r|--clear
    Clear Bayesian database (only useful with -b|--bayes option)

--enable-checking
    Enable spam filtering for specified mailname

--disable-checking
    Disable spam filtering for specified mailname

-e|--enable-mailname
    Add spam filtering for specified mailname

-E|--disable-mailname
    Delete spam filtering for specified mailname

-z|--action=save|delete|move
    What to do if the mail is recognized as spam. "save" (by default) places marked spam mail in mailbox, "delete" removes spam mail without placing it in mailbox and "move" mode places marked spam mail into "Spam" mailbox folder.

-n|--mailname=string
    Use a specified mailname instead of server config files

-x|--list-mailbox
    Show list of incoming message(s) for specified mailname. This is useful for Bayesian classifer training. List is in tab-delimited format of three fields in each line: "filename", "subject" and "from"

-o|--output-charset=string
    Specifies output charset for emails listing. Default is UTF8

-?|--help
    Show usage information

ARGUMENTS

start
    Start the SpamAssassin's daemon

stop
    Stop the SpamAssassin's daemon

restart
    Restart the SpamAssassin's daemon by sending to it an "SIGHUP". It will cause to restart daemon and reread it's configuration files

status
    Check for the SpamAssassin's daemon running

DESCRIPTION
The spammng utility is supposed to manage the SpamAssassin's daemon and it's configuration files. This utility can also be used to train the Bayesian classifier. You can find additional information located on corresponding manual pages for utilities listed in "SEE ALSO" tab.

SETTINGS' DETAILS AND USAGE POLICY
The -e|--enable-mailname and -E|--disable-mailname options will cause to rewrite the mailname's virtual user ".qmail" config file for enable or disable the spam filtering. Otherwise, starting the SpamAssassin's daemon without the -c|--enable-server-configs option will going by another way - it will start the spamd daemon with "-C" switch that will targets to a empty server-wide config patch. Note: then unusing -c|--enable-server-configs be carefully - it will erases server-wide config file before starting the SpamAssassin's daemon. Also note what the -e|--enable-mailname must be used every time you creating the mailbox in purpose of the server-wide configuration must affects on any of existing mailboxes.

EXIT CODES
Then the utility operation will be completed the notification will be shown and program exits with one of following exit codes.

EX_OK           0
    normal exit

EX_STOPPED      1
    daemon is not running (only used with status argument)

EX_USAGE       64
    command line usage error

EX_DATAERR     65
    data format error

EX_NOINPUT     66
    cannot open input

EX_NOUSER      67
    address unknown

EX_NOHOST      68
    host name unknown

EX_UNAVAILABLE 69
    service unavailable

EX_SOFTWARE    70
    internal software error

EX_OSERR       71
    system error (e.g., can't fork)

EX_OSFILE      72
    critical OS file missing

EX_CANTCREAT   73
    can't create (user) output file

EX_IOERR       74
    input/output error

EX_TEMPFAIL    75
    temp failure; user is invited to retry

EX_PROTOCOL    76
    remote error in protocol

EX_NOPERM      77
    permission denied

EX_CONFIG      78
    configuration error

INSTALLATION
The spammng command is part of the Mail::SpamAssassin Perl module. Install this as a normal Perl module, using "perl -MCPAN -e shell", or by hand.

ENVIRONMENT
No environment variables, aside from those used by perl, are required to be set.

SEE ALSO

Perl module documentation
    Mail::SpamAssassin

Unix manpages
    spamassassin(1) sa-learn(1) spamc(1) spamd(1)

Online documentation
    <http://www.paulgraham.com/>, Paul Graham's "A Plan For Spam" paper

    <http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.html>, Gary Robinson's f(x) and combining algorithms, as used in SpamAssassin

    <http://www.bgl.nu/~glouis/bogofilter/test6000.html>, discussion of various Bayes training regimes, including 'train on error' and unsupervised training

AUTHOR
Parallels <http://www.parallels.com>