Friday, 19 October 2012

greylist.pl in Mac OS X Lion Server

The code here has a problem but it so happens it has no effect on its operation.

It uses two databases, greylist.db and whitelist.db.

The intention seems to be that key/value pairs representing SMTP clients are initially stored in greylist.db then promoted to whitelist.db (that's the gist, anyway).  Due to a coding error in the open_whitelist_db subroutine %db_hash gets tied to whitelist.db when it has already been tied to greylist.db by a previous call to open_database, in smtpd_access_policy.

Since different keys were to be stored in the two databases anyway this does not affect the operation of the process, so having two databases was unnecessary.

I haven't check the code shipped with Mountain Lion (I can't upgrade this server to Mountain Lion as Apple have deemed its hardware to be too old).

2 comments:

Iain Houston said...

Mountain Lion OS X Server still has this coding error in greylist.pl ... am not totally convinced that its behaviour is as intended yet but, as you say, greylisting seems to work without the greylist.db ever being used.
Would like the time to really check that its not causing unnecessary delays.

Iain Houston said...

In the end I abandoned the OS X-supplied grey listing as I didn't feel confident that the coding of greylist.pl had been completed or tested. I installed Postgrey which seems generally well respected and has been working reliably in a way that I understand since July. I upgraded Mountain Lion to Mavericks and thus Server 2 to Server 3 and the only hitch I encountered was resolved by re-installing Postgrey according to the original instructions here