[exim] ratelimiting help

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Ruairi Hickey
Date:  
À: exim-users
Sujet: [exim] ratelimiting help
Hi,
    I'm trying to use ratelimiting to block connections from hosts who try send 
email to invalid recipients.  I was hoping to achieve this as follows:



# This block should increment the sources sending rate if the conditions are
# met, i.e. the destination mailbox doesn't exist

warn ratelimit = 2 / 10m / strict
    !hosts  = : +relay_from_hosts
    condition = ${if le{$sender_rate}{$sender_rate_limit}}
    logwrite  = RATE UPDATE: $sender_rate/$sender_rate_period (max 
$sender_rate_limit)
    condition = 
${lookup{$local_part@$domain}dbm{CONFDIR/validEmailAddresses.dbm} {no} {yes} }



# This block will deny any mails to mailboxes which dont exist

 deny
    log_message = Recipient Verification Failed:
    message = local error
#    delay = 30s
    domains = msre.ie : msre.com.sg
    condition = 
${lookup{$local_part@$domain}dbm{CONFDIR/validEmailAddresses.dbm} {no} {yes} }



# if the recipient is valid we should reach here and should deny the email if
# the sending rate as set above (to invalid addresses) is too high. The
# actual rate should not be updated (due to the noupdate option !!

deny ratelimit = 2 / 10m / strict / noupdate
    !hosts         = : +relay_from_hosts
    log_message = RATE: $sender_rate/$sender_rate_period (max 
$sender_rate_limit)



The problem is that the noupdate option does not seem to make any difference
and the rates as dumped from exim_dump are being updated by the final stanza.
Is this a bug in the Debian Lenny packaging or (more likely) am I doing
something incorrect....

Thanks for your assistance,

Ruairi