Hello Gordon, Yesterday I installed your Pythonfilter for my users to improve fighting spam using greylisting module. It has been working well for a few hours. Unfortunately after that time the greylist_NotPassed database has been corrupted:
Dec 11 18:37:29 xxx courierfilter: Uncaught exception in "greylist" doFilter function: <class 'bsddb.db.DBRunRecoveryError'>:(-30975, 'DB_RUNRECOVERY: Fatal error, run database recovery -- PANIC: fatal region error detected; run recovery') Dec 11 18:37:29 xxx courierfilter: File "/etc/courier/filters/active/pythonfilter", line 199, in processMessage Dec 11 18:37:29 xxx courierfilter: replyCode = i_filter[1](bodyFile, controlFileList) Dec 11 18:37:29 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/greylist.py", line 160, in doFilter Dec 11 18:37:29 xxx courierfilter: _sendersNotPassed.unlock() Dec 11 18:37:29 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/TtlDb.py", line 196, in unlock Dec 11 18:37:29 xxx courierfilter: self.db.sync() Dec 11 18:37:29 xxx courierfilter: File "bsddb/__init__.py", line 293, in sync Dec 11 18:37:29 xxx courierfilter: return _DeadlockWrap(self.db.sync) In the Courier log file also I can see a lot of error messages like below: Dec 12 11:00:06 xxx courierfilter: Uncaught exception in "greylist" doFilter function: <type 'exceptions.KeyError'>:'3d89ef72e9bbb1e4d677350b748b1832' Dec 12 11:00:06 xxx courierfilter: File "/etc/courier/filters/active/pythonfilter", line 199, in processMessage Dec 12 11:00:06 xxx courierfilter: replyCode = i_filter[1](bodyFile, controlFileList) Dec 12 11:00:06 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/greylist.py", line 106, in doFilter Dec 12 11:00:06 xxx courierfilter: _sendersNotPassed.purge() Dec 12 11:00:06 xxx courierfilter: File "/usr/lib/python2.5/site-packages/pythonfilter/TtlDb.py", line 214, in purge Dec 12 11:00:06 xxx courierfilter: if float(self.db[key]) < minVal: Dec 12 11:00:06 xxx courierfilter: File "bsddb/__init__.py", line 223, in __getitem__ Dec 12 11:00:06 xxx courierfilter: return _DeadlockWrap(lambda: self.db[key]) # self.db[key] Dec 12 11:00:06 xxx courierfilter: File "bsddb/dbutils.py", line 62, in DeadlockWrap Dec 12 11:00:06 xxx courierfilter: File "bsddb/__init__.py", line 223, in <lambda> Dec 12 11:00:06 xxx courierfilter: return _DeadlockWrap(lambda: self.db[key]) # self.db[key] I know that the greylist_NotPassed file is broken, because I checked it using `db4.6_verify` utility (Debian/Ubuntu db4.6-utils package): # db4.6_verify greylist_Passed # db4.6_verify greylist_NotPassed db4.6_verify: Page 20: hash page has bad prev_pgno db4.6_verify: Page 11: first page in hash bucket 9 has a prev_pgno db4.6_verify: Page 14: non-empty page in unused hash bucket 12 db4.6_verify: greylist_NotPassed: DB_VERIFY_BAD: Database verification failed I've fixed it using `db4.6_dump` and `db4.6_load` tools (the same package): # db4.6_dump greylist_NotPassed > greylist_NotPassed.dump # rm -f greylist_NotPassed # db4.6_load greylist_NotPassed < greylist_NotPassed.dump # db4.6_verify greylist_NotPassed It seems to be OK now, but I'm affaid to enable Pythonfilter again :) Here more details about my mail system. It includes a few virtual OpenVZ front-ends. My users Maildirs are shared between front-ends using NFS, so the greylist_* files was also shared via NFS. Do you think it matters? I've read about PostgreSQL support for Pythonfilter, but supposedly it's experimental. Also I don't have PostgreSQL database right now. What's your opinion about using NFS to sharing the greylist_* files? Do you think that PostgreSQL support is ready to use in stable and production environment? My best regards, Pawel ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users