Yahoo Groups archive

Milter-greylist

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

Message

Re: tarpit auto-whitelisting

2014-06-23 by Frank Doepper

Hi,

> Am 03.09.09 um 15:26 schrieb Kouhei Sutou:
>
> >     acl whitelist tarpit 65s
> >
> >   This ACL means that clients that can wait a response in
> >   65s are whitelisted. If the clients access again, they are
> >   acceptted without lazy response because they are in
> >   auto-whitelist.
>
> It seems that this auto-whitelisting does not work. Assumed that the
> sender is able to wait, messages are accepted after waiting, but
> subsequent messages with identical host,from,rcpt tuples have to wait
> again and again. No AUTO line (no line at all) is put into the DB.
>
> With a test config snippet
>
> racl whitelist rcpt /b/ tarpit 10s
>
> debugging output is
>
> Jun 19 15:58:23 host milter-greylist: created:  x.x.x.x from <a> to <b> delayed for 00:30:00
> Jun 19 15:58:33 host milter-greylist: removed: x.x.x.x from <a> to <b>
> Jun 19 15:58:33 host sm-mta[26004]: s5JDwMg9026004: from=<a>, size=217, class=0, nrcpts=1, msgid=<id@host>, proto=ESMTP, daemon=MTA-v6, relay=relay [x.x.x.x]
> Jun 19 15:58:33 host sm-mta[26004]: s5JDwMg9026004: Milter add: header: X-Greylist: Recipient e-mail whitelisted, Sender IP whitelisted by MX, Message whitelisted by tarpit 10s, ACL 127 matched, not delayed by milter-greylist-4.5.11 (host [y.y.y.y]); Thu, 19 Jun 2014 15:58:33 +0200 (CEST)
>
> Do I miss something? All I need is the documented behaviour.

I had a look at milter-greylist.c, line 802ff:

  if (sleep_duration > 0) {
          if (sleep_duration > priv->priv_max_tarpitted)
                  priv->priv_max_tarpitted = sleep_duration;
          priv->priv_total_tarpitted += sleep_duration;
          sleep(sleep_duration);
  } else {
      if (priv->priv_sr.sr_whitelist & EXF_WHITELIST) {
          tuple.updatetype = TU_AUTOWHITE;
          mg_tuple_update(&tuple);
          }
  }

it seems to me, after the "sleep(sleep_duration)" the entry would have to
be autowhitelisted, just if the the sender continues to send the mail. How
to accomplish this? real_envrcpt() does not get called again in this
session, and the entry is never autowhitelisted.

May someone have a look at it? I hesitate to put my dirty fingers on this
code. ;-)

Best regards,
Frank.

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.