Problem: Postfix Error 4.4.1 - message deferred

Problem

You can’t send nor receive e-mails. When looking into the /var/log/mail.log you find entries like

Jun 23 06:36:18 ucs-mail postfix/smtp[22885]: 12345600012: to=user@domain.tld, relay=none, delay=12934, delays=12934/0.02/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

After a closer look you might find also entries like

Jun 23 11:07:12 ucs-mail amavis[1593]: (!!)TROUBLE in pre_loop_hook: db_init: BDB no dbS: BDB0002 __fop_file_setup: Retry limit (100) exceeded, File exists. at (eval 92) line 318.
Jun 23 11:07:12 ucs-mail amavis[1593]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: db_init: BDB no dbS: BDB0002 __fop_file_setup: Retry limit (100) exceeded, File exists. at (eval 92) line 318.

Solution

The Amavis database seems to be corrupted. Fortunately this is easy to repair. Backup the old database - just in case - and delete it.

root@ucs-mail:~# systemctl stop amavis.service
root@ucs-mail:~# cd  /var/lib/amavis/db/
root@ucs-mail:/var/lib/amavis/db/# tar -cjvf ~/amavis_db_backup.tar.bz2 * --remove-files
root@ucs-mail:~# systemctl start amavis.service

When you look into the /var/log/mail.log you will (hopefully) recognize how the new Amavis database is created and postfix starts to roll the e-mails.

Mastodon