Postfix & poplock.db

For some reason, this only seems to be a problem with VPSes running Plesk. In my case, the VPS exceeded its disk quota, and postfix couldn’t write one of the db files:

Aug 15 00:16:02 s15353558 poplock DB cleanup[11517]: fatal error: postmap: fatal: open database /var/spool/postfix/plesk/poplock.db: Disk quota exceeded

Which, because a cronjob is running every 10 minutes messing around with that file, /var/log/messages started filling up with this error:

Aug 15 00:26:02 s15353558 poplock DB cleanup[11561]: fatal error: postmap: fatal: open database /var/spool/postfix/plesk/poplock.db: Bad file descriptor

Searching for the exact error message on Google found very little. Googling “postfix poplock.db”, however, was a bit more helpful in that it found “fatal: open database /var/spool/postfix/plesk/poplock.db: Invalid argument”, which, surprise surprise, had a post which solved the problem.

Just in case the site ever goes down, here are the steps, copied + pasted:

/usr/local/psa/admin/sbin/mailmng --stop-service
mv /var/spool/postfix/plesk/poplock.db /var/spool/postfix/plesk/poplock.db_
/usr/local/psa/admin/sbin/mchk --with-spam
/usr/local/psa/admin/sbin/mailmng --start-service

, ,

  1. #1 by Julian Richter on March 7, 2012 - 5:23 pm

    Thanks alot! Exactly solved the problem here.

(will not be published)