Ever since we had a hardware failure that forced a couple of hard reboots to a system, Postgrey crashes when it tries to rotate its log files.

The mail logs show this error: postgrey[31361]: cleaning up old logs... postgrey[31361]: WARNING: can't checkpoint !? PANIC: fatal region error detected; run recovery at /usr/sbin/postgrey line 219.#012 postgrey[31361]: cleaning up old entries... postgrey[31361]: FATAL: Can't call method "txn_commit" on an undefined value at /usr/sbin/postgrey line 265.#012 postfix/smtpd[27248]: warning: connect to Connection refused

Our engineer ran the recovery on /var/lib/postgrey/postgrey.db and we restarted the service. It ran fine until the next time it attempted to rotate the log files, where it failed, and was again left in a quasi-running state. During this time no email is deliverable to the system.

If the database is beyond repair, is it possible for it to be recreated if Postgrey is stopped, the file is deleted or renamed, and the service is restarted?




That sounds like some kind of file corruption..

If you don't mind losing all of postgrey's state about previous senders, you could shut it down, delete /var/lib/postgrey/* , and then start it up again..

Yeah, the idea of losing all that data is not exciting, however, with the complaints I am now receiving because so much more spam is getting through, I'm inclined to go that route. Thanks for the confirmation. It matches what I've read elsewhere.