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,
--
kouMessage
[PATCH] tarpit support
2009-09-03 by Kouhei Sutou
Attachments
- No local attachments were found for this message.