2  Usage

Currently there are two executables hato-mta and hato-classify.

2.1  hato-mta

Hato is still in early beta, so you probably won’t want to run it as your primary mail server yet. If you run as a non-root user it will by default start up on port 5025, otherwise as root it starts on the standard port 25. You can also specify the port with the --port option. The default mail spool directory is /var/mail/ for root, and $HOME/hato/var/mail/ for non-root users.

You can interactively in a REPL fashion by specifying the --test option. This handles a single non-threaded SMTP session from standard input, and provides the additional EVAL SMTP command to evaluate arbitrary Scheme expressions:

EVAL (set! log-level (+ 1 log-level))

A single file-name argument may be provided in test-mode which will then be used instead of standard input for batch tests. The --debug option will make hato-mta output more verbose debugging information.

2.2  hato-classify

hato-classify is a stand-alone adaptive spam classifier which can use a number of different probabilistic methods, including Markov chains (the default) and naive Bayesian probability. It uses the same libraries and can use the same database file as the spam filtering provided by hato-mta.

The two basic modes of operations are:

hato-classify -exit-code

Filters standard input and exits with a return value of 0 if not spam and 1 if spam, compatible with many other filter.

hato-classify -insert-header

Filters standard input and prints it back to standard output with two MIME headers inserted as follows:

      X-Spam-Classification: [HAM or SPAM] 
      X-Spam-Probability: 0.5 

See hato-classify -help for more information.