Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Disregard recipient while grey listing

2016-02-28 by manu@...

Mauricio Teixeira mauricio.teixeira@... [milter-greylist]
<milter-greylist@yahoogroups.com> wrote:

> I do. But that doesn't really matter in our case.

The relevant code is in pending.c:

                        /*
                         * Look for our record
                         */
                        if (ip_match(sa, pending->p_sa, mask) &&
                            ((conf.c_lazyaw == 1) ||
                            ((strcasecmp(from, pending->p_from) == 0) && 
                            (strcasecmp(rcpt, pending->p_rcpt) == 0)))) {


Hacking it in order to change lazyaw semantics and cause it to consider
IP+recpient is easy, you just have one line to move. But that change cannot be
integrated into the sources since the change on lazyaw breaks existing
configurations. 

In order to avoid that and make the change acceptable, it needs to be a
generalization of lazyaw. The configuration option is just a flag for now, it
could get a set of values to consider:
  lazyaw addr            (équivalent to lazya without argument)
  lazyaw addr rcpt     (what you ware looking for)

Implementing this means adding a few lines in conf_yacc.y and of course
replacing the if block quoted above in pending.c by a function call that would
do the mote complex tests.

And there is the F2B_SPICE macro in milter-greylist.h that would become an
inline function with cases depending of lazyaw values. And documentation
update, including your name in the list of milter-greylist authors :-)

The alternative is just moving one line in pending.c and live with a local
patch.

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.