Add mx clause to query MX records

I have been using Postfix + milter-greylist for several weeks.
As I check the greylist.db, among the greylisted clients I often find some which match to MX of the sender address.

I searched some examples to whitelist MX, but I couldn't find them.
So I wrote a patch of an mx clause for milter-greylist to query MX records.

Activate mx clause

I have only tested the patch for milter-greylist-4.2.7 on FreeBSD 7.1/i386, 7.2/i386 and 8.2/amd64.

In order to apply the patch, build as follows:

% cd milter-greylist-4.2.7
% gzcat milter-greylist-mx-patch.diff.gz | patch -p1
% autoconf
% autoheader
% ./configure --enable-mx
% make
# make install

Now, you can use mx clause in racl.
In order to whitelist the client which matches to one of the addresses of MXes of the domain part of the sender address, add in greylist.conf the rule like:

racl whitelist mx


You can get the patch from milter-greylist-4.2.7-mx.patch.gz and use it at your own risk.


Emmanuel Dreyfus and contributors

Last modified: 2011/11/11 09:14:39. #855