Debian 12 Update Notes

In going from Debian 10 to 12, there are a few notes.

Journal Logging

Debian 12 has moved to systemd journals by default and no longer installs rsyslog. Things that examine the logs like fail2ban and logwatch require different configuration. The use_journalctl variable now controls this and defaults to true. Set to false if still using file-based logging. We still install logrotate because some packages still use log files.

When updating, I ran into a problem with permissions on the postfix spool directory and it wasn't starting. I was suprised that there was no mail.log in /var/log anymore, but now you use journalctl to get the logs for everything. To see the log for postfix, now you do:

% journalctl -u postfix@-.service

You can check service name by bash auto complete. Or view the list from "systemctl status" command.

Rspamd and Redis

Rspamd has moved over completely to redis. Previously we were using sqlite to store the classifier statistics. The stats are under /var/lib and will be lost when replacing the system disk. Copy the spam/ham sqlite someplace safe. They are at:

/var/lib/rspamd/bayes.spam.sqlite
/var/lib/rspamd/bayes.ham.sqlite
/var/lib/rspamd/learn_cache.sqlite
Once you have the new redis-based installation in place, import them as below:

% rspamadm statconvert --redis-host 127.0.0.1 \
   --spam-db bayes.spam.sqlite --symbol-spam BAYES_SPAM \
   --ham-db bayes.ham.sqlite --symbol-ham BAYES_HAM
   --cache learn_cache.sqlite

Going forward, make sure that the redis database is part of your backup set. You can specify redis_dbdir to move it to your encrypted directory or another backed up location.