Re: [exim] Ratelimit

Góra strony
Delete this message
Reply to this message
Autor: Ian Porter
Data:  
Dla: exim-users
Temat: Re: [exim] Ratelimit
Hi All,

Nah, does not seem to matter where I place these ratelimits
/etc/exim4/conf.d/30_exim4-config_check_rcpt
or
/etc/exim4/exim4.conf.template

The messages still go through without any problems. Just to make sure
I am trying to send a mail from the local host to an remote email
address will these restrictions apply ? and also log in the
/var/log/exim4/mainlog ?

Regards
Ian
On Sat, Dec 10, 2011 at 12:41 PM, Jan Ingvoldstad <frettled@???> wrote:
> On Fri, Dec 9, 2011 at 22:39, Ian Porter <ian@???> wrote:
>>
>> Hi All,
>>
>> I am trying to use the ratelimit to deny any more than 10 emails per
>> second.  I have tried adding this to the
>> /etc/exim4/exim4.conf.template and also within the
>> /etc/exim4/conf.d/acl/10_exim4_config-deny-ratecheck
>>
>> acl_deny_rate_check_exceptions:
>>    deny ratelimit = 10 / 1s / $primary_hostname
>>          log_message = Sorry, too busy, ratelimit
>>
>>
>> But it does not do anything ? any advice ?
>
> Where do you call that ACL from?
>
> The rate limiting examples I have seen, and those I've used for
> implementing them myself, are all placed in acl_check_rcpt, which is
> where you want to have a check for per-rcpt limits.
>
> Example for authenticated users:
>
> acl_check_rcpt:
>
>  warn ratelimit = 0 / 1h / strict
>       logwrite = :main: \
>                  Rate: $sender_rate/$sender_rate_period \
>                  $message_id \
>                  $sender_address ($sender_host_name[$sender_host_address]) \
>                   -> $local_part@$domain
>
> # Authenticated users limited to 90 messages per minute
>  deny authenticated = *
>       ratelimit = 90 / 1m / strict / ${authenticated_id}_minute
>       message = Sending rate exceeded, $sender_rate/$sender_rate_period \
>                 (max $sender_rate_limit/$sender_rate_period)
>       logwrite = :main,reject: \
>                  Rate exceeded:  $sender_rate/$sender_rate_period \
>                  (max $sender_rate_limit) $message_id \
>                  $sender_address ($sender_host_name[$sender_host_address]) \
>                   -> $local_part@$domain
>
>
>
> Example for a smarthost setup:
>
> # Relayed hosts limited to 180 messages per minute
> defer message = Sending rate exceeded, $sender_rate/$sender_rate_period \
>                       (max $sender_rate_limit/$sender_rate_period)
>      ratelimit = 180 / 1m / ${primary_hostname}_minute
>      hosts = +relay_from_hosts
>      logwrite = :main: \
>                        Rate exceeded for remote system:
> $sender_rate/$sender_rate_period \
>                (max $sender_rate_limit) $message_id [$sender_host_address] \
>                 -> $local_part@$domain
>
> --
> Jan
>
> --
> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/




--
Regards
Ian Porter

www: www.codingfriends.com