Re: [Exim] Greylisting for Exim?

Góra strony
Delete this message
Reply to this message
Autor: David Saez
Data:  
Dla: Sheldon Hearn
CC: exim-users
Temat: Re: [Exim] Greylisting for Exim?
Hi !!

> Anyone working on a Greylisting implementation for Exim?


You could do it by using exim acl, i.e:

GRAYLIST_TEST = SELECT
IF(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(dtime)<300,1,2) \
                FROM graylisting \
                WHERE ip='${quote_mysql:$sender_host_address}' \
                AND domain='${quote_mysql:$sender_address_domain}'


GRAYLIST_ADD  = INSERT INTO graylisting ( ip, domain, dtime ) \
                VALUES ( '${quote_mysql:$sender_host_address}', \
                '${quote_mysql:$sender_address_domain}', NOW() )


and on rcpt acl:

# Graylisting
# acl_m7 = 0 -> not on database
# acl_m7 = 1 -> on database but not expired
# acl_m7 = 2 -> on database and expired

  warn    set acl_m7     = ${lookup mysql{GRAYLIST_TEST}{$value}{0}}


  defer   condition      = ${if eq{$acl_m7}{0}{1}}
          condition      = ${lookup mysql{GRAYLIST_ADD}{yes}{no}}


  defer   condition      = ${if eq{$acl_m7}{1}{1}}



Note that this implementation does not use triplets (it only uses
host ip and sender domain) and records should be expired from
outside exim. Also the first timeout is set to 5 minutes instead
of one hour.

--
Best regeards ...

It's easier to obtain forgiveness than permission.

----------------------------------------------------------------
   David Saez Padros                http://www.ols.es
   On-Line Services 2000 S.L.       e-mail  david@???
   Pintor Vayreda 1                 telf    +34 902 50 29 75
   08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------