Hello,

I have an admittedly basic question, but I have been trying to troubleshoot 
this for a while with no success.

I have enabled postscreen(8) on Postfix 3.1 and receive a warning in mail.log: 

“close database /var/spool/postfix/var/lib/postscreen_cache.db: No such file or 
directory (possible Berkeley DB bug)”

A quick Google of this returns that this is caused on Debian systems that run 
Postfix in a jail (which matches my system).  The most recent post regarding 
this appears to be here: 
https://tech.feedyourhead.at/content/postscreen_cache_db_no_such_file

As per the blog posting, I stopped Postfix and created a directory in the jail 
for the postscreen_cache.db:

$ sudo systemctl stop postfix.service
$ sudo mkdir -p /var/spool/postfix/var/lib/postfix

I moved the postscreen_cache.db file to this location:

$ sudo mv /var/lib/postfix/postscreen_cache.db 
/var/spool/postfix/var/lib/postfix

I set the permission and ownership on this file:

$ sudo chown postfix:postfix 
/var/spool/postfix/var/lib/postfix/postscreen_cache.db
$ sudo chmod 0660 /var/spool/postfix/var/lib/postfix/postscreen_cache.db

I checked that the postfix user can access this file:

$ sudo -u postfix namei -m 
/var/spool/postfix/var/lib/postfix/postscreen_cache.db

I *DIFFER* from the blog in that I do not create a symbolic link - I use the 
Postfix main.cf configuration parameter below:

postscreen_cache_map = btree:/var/spool/postfix/var/lib/postfix/postscreen_cache

I then start Postfix:

$ sudo systemctl start postfix.service

When I check: /var/spool/postfix/var/lib/postfix I can see that 
postscreen_cache.db is updated as time progress, but I still get the warning 
about not being able to close the postscreen_cache.db database.

What am I missing ?

Thanks,

- J

Reply via email to