Autor: Nico Erfurth Data: Para: Alistair Mann CC: exim-users Assunto: Re: [Exim] Limiting messages per N hours
Alistair Mann wrote: > Greetings all,
>
> I'm investgating how we might limit the number of emails per period that our
> exim server may forward to particular domains, or addresses.
>
> What we are doing is, on a per application basis, having severe or fatal
> problems ('disk full', etc) emailed to appropriate mobile phones via an sms
> gateway. However as contacts and systems increase in number, we need to move
> the throttle from the (many) applications to the mail server such that exim
> will, for instance, forward the first two such mails in every 6 hours, on the
> third send a prearranged message ('3 or more severe problems, please contact
> the office') and discard fourth and subsequent mails. (A maillist will
> already have sent emails to people's iboxes, so the thrid and subsequents are
> not completely lost).
>
> The soothing side for domestic harmony is obviously far more important than
> anything else!
>
> I've not been able to google up anything like the above, or see anything in
> the docs under 'limit' or 'throttle'. Before I knock something up in perl, is
> anyone here aware of anything in Exim that already provides the above?
Exim does not have built-in support for this (and most probably will
never have it).
But you can either use embedded perl or the new ${readsocket}-operator
(included in exim4) to hack something up.
With readsocket you would have to write a small daemon, that listens on
a unix-port and use a small tiny protocol the query/update the current
status.