Yahoo Groups archive

Milter-greylist

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

Thread

[PATCH] tarpit support

[PATCH] tarpit support

2009-09-03 by Kouhei Sutou

Hi,

I create a patch to support 'tarpit'.

Here is a description how to use 'tarpit' feature from
README:

   15 Using tarpit
   ===============

  'tarpit' is an anti-spam technique by lazy response.

    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.

  If clients that couldn't wait a lazy response access again,
  the ACL doesn't match.

    acl whitelist tarpit 65s
    default greylist

  Those ACLs means that clients that can wait a lazy
  response or resend a message are acceptable.

    acl greylist tarpit 10s

  This ACL means that clients should wait a response in 10s
  then pass greylist.

  If clients that couldn't wait a lazy reponse access again,
  the ACL doesn't match.

    acl greylist tarpit 10s
    default blacklist

  Those ACLs means that clients should wait a lazy response
  and pass greylist. Otherwise they are rejected.

  There is a 'tarpit_accumulation_period' configuration
  parameter. It controls how to count tarpitted
  time. Available values are 'session' and 'action'. 'session'
  means that tarpitted time is counted in a SMTP session
  scope.  'action' means that tarpitted time is coutned in an
  action (request/response) scope. The default is 'session'.

    acl whitelist rcpt user1@... tarpit 10s
    acl whitelist rcpt user2@... tarpit 30s
    acl whitelist rcpt user3@... tarpit 15s

  It assumes that a client sends a mail to user1@...,
  user2@... and user3@... in a SMTP session
  when those ACLs are used.

  'session' case:
    milter-greylist waits to returns a response in
    10s for user1@.... Then milter-greylist waits to
    returns a response in 20s for user2@.... 20s is
    30s (tarpit time for user2@...) - 10s (tarpit time
    for user1@...). milter-greylist just wait 20s
    because milter-greylist had waited 10s. Then
    milter-greylist doesn't wait to returns a response for
    user3@... because total 30s had waited in this
    SMTP session.

      user1@...: tarpit 10s
      user2@...: tarpit 20s
      user3@...: not tarpitted

  'action' case:
    milter-greylist waits to returns a response in 10s for
    user1@.... Then milter-greylist waits to returns a
    response in 30s for user2@.... Waited time in the
    previous action are not counted. Then milter-greylist
    doesn't wait to returns a response for user3@...
    because over 10s had waited in other action.

      user1@...: tarpit 10s
      user2@...: tarpit 30s
      user3@...: not tarpitted


RFC: It seems that name of 'tarpit_accumulation_period' can
be improved but I don't have better idea. :<
Could someone give us your idea?


Thanks,
--
kou

Re: [milter-greylist] [PATCH] tarpit support [1 Attachment]

2009-09-04 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

>     acl greylist tarpit 10s
>     default blacklist

Thank you for workig on this. Two points:

- This should be '"acl blacklist default". Moreover, "acl" has been
derecated a long time ago in favor of racl/dacl for RCPT-stage vs
DATA-stage ACL.

- where is the pach?


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

Re: [milter-greylist] [PATCH] tarpit support

2009-09-04 by Kouhei Sutou

Hi,

In <1j5i6cf.19xtu7thvffdbM%manu@...>
  "Re: [milter-greylist] [PATCH] tarpit support" on Fri, 4 Sep 2009 05:11:35 +0200,
  manu@... wrote:

> - This should be '"acl blacklist default". Moreover, "acl" has been
> derecated a long time ago in favor of racl/dacl for RCPT-stage vs
> DATA-stage ACL.

I fixed it.
There are many 'acl' in README. Should I create a patch to
fix them?

> - where is the pach?

I put revised patch into here:
  http://www.clear-code.com/~kou/patches/milter-greylist-tarpit.diff

It seems that you can't get attached patch from ML...
FYI: The previous patch is here:
  http://d.yimg.com/kq/groups/12763546/482832800/name/milter-greylist-tarpit%2Ediff

Thanks,
--
kou

Re: [milter-greylist] [PATCH] tarpit support

2009-09-04 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> I fixed it.
> There are many 'acl' in README. Should I create a patch to
> fix them?

Oops, you are right. I'll fix that.

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

Re: [milter-greylist] [PATCH] tarpit support

2009-09-06 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> I put revised patch into here:

It looks goof, I have only really minor comments on config statements:

1) tarpit_accumulation_period 
It's a bit long, isn't it? What about somethign shorter?
tarpit_sum
tarpit_total
tarpit_state
tarpit_scope 

2) session vs action
session is nice. I understand action is a single SMTP command scope?
What about just command?

3) a few typos ("coutned"), and 8à char overrun, I can fix that, don't
worry.

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

Re: [milter-greylist] [PATCH] tarpit support

2009-09-07 by Kouhei Sutou

Hi,

I uploaded a revised patch:
  http://www.clear-code.com/~kou/patches/milter-greylist-tarpit-v2.diff

In <1j5m80s.anbo2c1aaib5qM%manu@...>
  "Re: [milter-greylist] [PATCH] tarpit support" on Sun, 6 Sep 2009 09:43:54 +0200,
  manu@... wrote:

> 1) tarpit_accumulation_period
> It's a bit long, isn't it? What about somethign shorter?
> tarpit_sum
> tarpit_total
> tarpit_state
> tarpit_scope

I used 'tarpit_scope'.

> 2) session vs action
> session is nice. I understand action is a single SMTP command scope?
> What about just command?

I used 'command' instead of 'action'.

> 3) a few typos ("coutned"), and 8à char overrun, I can fix that, don't
> worry.

Oops...
I've fixed some typos...


Thanks,
--
kou

Re: [milter-greylist] [PATCH] tarpit support

2009-09-07 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> I uploaded a revised patch:
>   http://www.clear-code.com/~kou/patches/milter-greylist-tarpit-v2.diff

I committed it. 

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

Re: [milter-greylist] [PATCH] tarpit support

2009-09-08 by Kouhei Sutou

In <1j5nxou.q4p1751lr4ez1M%manu@...>
  "Re: [milter-greylist] [PATCH] tarpit support" on Mon, 7 Sep 2009 07:49:04 +0200,
  manu@... wrote:

>> I uploaded a revised patch:
>> http://www.clear-code.com/~kou/patches/milter-greylist-tarpit-v2.diff
> 
> I committed it.

Thanks!!!
--
kou

Re: [milter-greylist] [PATCH] tarpit support

2009-09-08 by manu@netbsd.org

Kouhei Sutou <kou@...> wrote:

> > I committed it.
> Thanks!!!

Thank you for working on it.

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

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.