Problem: muss zuerst in das mbox-Format konvertiert werden:

for i in Maildir/cur/*;do formail -I "Status: RO" <"$i" >>~/hambox;done
for i in Maildir/.Spam\ Privat/cur/*;do formail -I "Status: RO" <"$i" >>~/spambox;done

Quelle: ~ $
Danach kann der Bayes-Filter von Spamassassin angelernt werden:

sa-learn --showdots --mbox --spam /home/xxxx/spambox
sa-learn --showdots --mbox --ham /home/xxxx/hambox

Um das tägliche Upate der spamassassin-Datenbank durchzuführen, muss das erst unter Debian aktiviert werden. Die Aktivierung erfolgt in der Datei /etc/default/spamassassin:

# /etc/default/spamassassin
# Duncan Findlay

# WARNING: please read README.spamd before using.
# There may be security risks.

# If you're using systemd (default for jessie), the ENABLED setting is
# not used. Instead, enable spamd by issuing:
# systemctl enable spamassassin.service
# Change to "1" to enable spamd on systems using sysvinit:

# Options
# See man spamd for possible options. The -d option is automatically added.

# SpamAssassin uses a preforking model, so be careful! You need to
# make sure --max-children is not set to anything higher than 5,
# unless you know what you're doing.

OPTIONS="--create-prefs --max-children 5 --helper-home-dir"

# Pid file
# Where should spamd write its PID to file? If you use the -u or
# --username option above, this needs to be writable by that user.
# Otherwise, the init script will not be able to shut spamd down.

# Set nice level of spamd
#NICE="--nicelevel 15"

# Cronjob
# Set to anything but 0 to enable the cron job to automatically update
# spamassassin's rules on a nightly basis

Wenn der Cronjob mit der Fehlermeldung

error: unable to refresh mirrors file for channel, using old file
channel: could not find working mirror, channel failed
sa-update failed for unknown reasons

abbricht, dann liegt das an falschen Zugriffsberechtigungen im Verzeichnis /var/lib/spamassassin. Die Korrektur erfolgt mit:

# chown -R debian-spamd:debian-spamd /var/lib/spamassassin/