FUN WITH LINUX

Fixing "postscreen_cache.db: No such file or directory"

13 February 2017

If I enable postscreen on a Debian-Host I’ll get this strange message in my mail.log:

Feb 13 08:38:37 tardis postfix/postscreen[17453]: close database /var/lib/postfix/postscreen_cache.db: No such file or directory (possible Berkeley DB bug)

It looks like the postscreen_cache.db-file is located in /var/lib/postfix instead of the postfix-jail /var/spool/postfix/var/lib/postfix. So we can fix it by moving the file into the jail:

    root@tardis:~# service postfix stop
    root@tardis:~# mkdir -p /var/spool/postfix/var/lib/postfix
    root@tardis:~# mv /var/lib/postfix/postscreen_cache.db /var/spool/postfix/var/lib/postfix
    root@tardis:~# ln -s /var/spool/postfix/var/lib/postfix/postscreen_cache.db /var/lib/postfix/postscreen_cache.db
    root@tardis:~# service postfix start
[ Mail  Sysadmin  Tricks  Email  ]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 Unported License.

Copyright 2015-present Hoti