NAME

myspam - Command-line interface to the MySpam application

SYNOPSIS

myspam [-c <config>] <COMMAND> [args]

DESCRIPTION

MySpam is all about managing mail that has been blocked by sa-exim. myspam is the shell (administrative) interface to MySpam. Most users would only interact with MySpam using the email interface (see myspam-smtp for details).

<COMMAND> usually results in some kind of action in the MySpam database, or may result in emails being sent.

-c config

Specify a configuration file other than the default /etc/myspam/myspam.conf.

COMMANDS

install [--db]

Prints the CREATE statements used to build the database tables and indexes. If the optional '--db' if given then the actions will actually be run against in the database. You only need to run this action once against the database. Users of the Debian package don't need to do this - the (SQLite) database is created automatically at installation time.

quarantine <file>|<directory> [--rm]

Imports into the database <file> or the files in <directory>. If '--rm' is specified then the file(s) will be removed after successfully being inserted.

The files to be imported must be in standard mbox format and must have a X-SA-Exim-Rcpt-To: header. NOTE: This header is only added by sa-exim if SAmaxrcptlistlength in /etc/exim4/sa-exim.conf is set to a positive value.

expire

Delete old mails from the database. The maximum age of a mail is determined by the 'expire' item in /etc/myspam/myspam.conf. This command would not normally be run by hand but would be called from a cron(8) job.

list <recipient>

List the mails which are in the database for <recipient>

release <recipient> <id>

Release the mail with matching <recipient> and <id>.

delete <recipient> <id>

Delete the mail with matching <recipient> and <id>.

whitelist <recipient> <sender>

Add address <sender> to the whitelist for <recipient>. The whitelist functionality only works if the appropriate plugin for SpamAssassin has been installed and configured.

unwhitelist <recipient> <sender>

Remove address <sender> from the whitelist for <recipient>. The whitelist functionality only works if the appropriate plugin for SpamAssassin has been installed and configured.

listwhitelist <recipient>

Print the whitelist for <recipient>. Output includes the date each whitelist entry was created.

genwhitelist

Generates a Berkeley DBM file containing sender/recipient pairs in the whitelist. This DBM file can be used by the MySpam/Whitelist plugin for SpamAssassin to decrease the score for matching pairs. This command is not normally run by hand but would be called by a cron(8) job.

subscribe <recipient> <days>

Add the address <recipient> to the subscription list sent every <days> days.

unsubscribe <recipient>

Remove the address <recipient> from all subscription lists.

newsletter [--send]

Send out the newsletter to addresses whose subscription is due today.

If --send is not given then this command merely prints the addresses that would receive a newsletter.

This command would not normally be run by hand but called from a cron(8) job.

CONFIGURATION FILE

/etc/myspam/myspam.conf is the default configuration file. It should define the following keys, separated from the values by '='.

dbi

A standard DBI database connection string such as dbi:SQLite:/var/lib/myspam/myspam.db.

user

Database user name.

pass

Database user password.

admin

The contact address for users with problems. Also gets Cc'd in the event of an error.

expire

The number of seconds which messages in the database can age before they are removed.

whitelist

The location of the DBM file for the SpamAssassin WhitelistDBM plugin. This must match with the /etc/spamassassin/whitelistdbm.cf config file.

FILES

/etc/myspam/myspam.conf - database connection information

/etc/myspam/myspam.css - style definition for HTML email

/etc/spamassassin/whitelistdbm.cf

/var/log/mail.* - syslog(8) reporting of success or failure

SEE ALSO

MySpam, myspam-smtp

AUTHOR

Mark Lawrence <nomad@null.net>

COPYRIGHT AND LICENSE

Copyright 2007-2009 Mark Lawrence <nomad@null.net>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.