Re: [exim] Outbound mail rate limiting

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jeremy Harris
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Outbound mail rate limiting
On 01/10/14 12:44, Uros Meglic wrote:
> I would like to limit all
> outgoing smtp mail, let's say 8 mails per minute and what is over that
> limit gets put in the waiting queue.


For your situation, where exim is a pure MTA, as Lena says:
limit the acceptance rate from your MSA (the Exchange system)
and force it do do the queueing.

For the record, I managed to twist exim out of shape in
a way that will also work for an MSA. You do need a recent
exim version:

========%cut_here%==========

begin acl

# One arg: target host name
outbound_rate_ok:
accept !ratelimit = 1.1 / 5m / per-cmd / ${acl_arg1}_outbound

begin transports

remote_smtp_mx:
  driver =              smtp
...
  hosts_override =              true
  hosts =                       ${if acl {{outbound_rate_ok}{$host}} {<; $host_address}{127.0.0.2}}
  connection_max_messages =     1



--
Cheers,
Jeremy