postgrey rejects all emails

Bug #1289389 reported by psl
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
postgrey (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ubuntu 12.04.4 LTS, 64-bit
postgrey 1.34-1

postgrey regulary starts to reject all emails with action "greylisted". I checked log files and I see these strange messages there:

Mar 6 02:11:39 mda postgrey[1086]: cleaning up old logs...
Mar 6 02:11:40 mda postgrey[1086]: cleaning up old entries...
Mar 6 02:11:40 mda postgrey[1086]: WARNING: Argument "1391011722M-^W\0^A62.97.141.71/owner-nolist-mdirector-no..." isn't numeric in subtraction (-) at /usr/sbin/postgrey line 267.#012
...
...
Mar 6 03:11:39 mda postgrey[1086]: cleaning up old logs...
Mar 6 03:11:39 mda postgrey[1086]: WARNING: can't checkpoint !? PANIC: fatal region error detected; run recovery at /usr/sbin/postgrey line 237.#012

This is critical bug from my point of view, it is kind of DoS attack because once this problem is triggered, all emails are rejected.

psl (slansky)
summary: - postgrey rejects all email
+ postgrey rejects all emails
description: updated
psl (slansky)
description: updated
Revision history for this message
psl (slansky) wrote :

I found that one of DBs is corrupted:

# db_verify /var/lib/postgrey/postgrey_clients.db
Verification of /var/lib/postgrey/postgrey_clients.db succeeded.

# db_verify /var/lib/postgrey/postgrey.db
db_verify: Page 17: unaligned offset 3917 at page index 1
db_verify: Page 17: gap between items at offset 3916
db_verify: Page 17: item order check unsafe: skipping
db_verify: /var/lib/postgrey/postgrey.db: DB_VERIFY_BAD: Database verification failed
Verification of /var/lib/postgrey/postgrey.db failed.

I am not sure why DB is corrupted, maybe that postgrey crashed in the past...

Revision history for this message
psl (slansky) wrote :

I deleted DB in /var/lib/postgrey/ and started postgrey to create fresh DB. That was on Friday. It is Monday and I see DB is corrupted again.

# db_verify /var/lib/postgrey/*.db

db_verify: Page 466: incorrect next_pgno 583 found in leaf chain (should be 204)
db_verify: Page 204: incorrect prev_pgno 583 found in leaf chain (should be 466)
db_verify: Page 369: incorrect next_pgno 584 found in leaf chain (should be 239)
db_verify: /var/lib/postgrey/postgrey.db: DB_VERIFY_BAD: Database verification failed
Verification of /var/lib/postgrey/postgrey_clients.db succeeded.
Verification of /var/lib/postgrey/postgrey.db failed.

Once postgrey is restarted, DB is fixed. This happened second time today...

# service postgrey restart
# db_verify /var/lib/postgrey/*db

Verification of /var/lib/postgrey/postgrey_clients.db succeeded.
Verification of /var/lib/postgrey/postgrey.db succeeded.

Notice: /etc/init.d/postgrey script is broken and has to be modified. Script distributed with U12.04 will report that postgrey was restarted but it was not restarted!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.