Limit of sent emails per day (24h)

Post Reply
n1ebieski
Posts: 5
Joined: Sun Jul 05, 2020 12:43 pm

Hi, Is it possible to set a limit of sent emails per one day (24h) instead per one hour?
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

Edit /etc/exim4/exim4.conf.template

- this line - https://github.com/myvesta/vesta/blob/m ... plate#L110
- and this line - https://github.com/myvesta/vesta/blob/m ... mplate#L70

I think replacing 1h to 24h will works.

Then restart exim:

Code: Select all

service exim4 restart
arktex54
Posts: 14
Joined: Wed Jul 15, 2020 11:10 pm

dpeca wrote: Sun Jul 05, 2020 1:32 pm Edit /etc/exim4/exim4.conf.template

- this line - https://github.com/myvesta/vesta/blob/m ... plate#L110
- and this line - https://github.com/myvesta/vesta/blob/m ... mplate#L70

I think replacing 1h to 24h will works.

Then restart exim:

Code: Select all

service exim4 restart
How do I set rate limit ignore to a domain? Like one that sends camera recordings 500/hr. Just a number... idk real number.
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

I must check it.
I can't promise when it will be, i will try in next 10 days.
Ominae
Posts: 21
Joined: Fri Jul 10, 2020 4:30 am

dpeca wrote: Sun Jul 05, 2020 1:32 pm Edit /etc/exim4/exim4.conf.template

- this line - https://github.com/myvesta/vesta/blob/m ... plate#L110
- and this line - https://github.com/myvesta/vesta/blob/m ... mplate#L70

I think replacing 1h to 24h will works.

Then restart exim:

Code: Select all

service exim4 restart
ratelimit = 40 / 1h /
40 is it the amount of mail?

if i replace this
warn ratelimit = 0 / 1h /

for this
warn ratelimit = 1 / 24h /

who receives a warning email?
the user or the administrator?
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

Ominae wrote: Sat Jul 25, 2020 8:21 am ratelimit = 40 / 1h /
40 is it the amount of mail?
Yes.
Ominae wrote: Sat Jul 25, 2020 8:21 am if i replace this
warn ratelimit = 0 / 1h /

for this
warn ratelimit = 1 / 24h /

who receives a warning email?
the user or the administrator?
User will receive error message during the sending of message.
I'm planing to make some montoring service that will alert admin (not only about this, but also for big load avarage, low disk space, if some service goes down, etc...)
User avatar
myVesta
Site Admin
Posts: 963
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 10 times
Been thanked: 6 times

warn ratelimit does nothing except it log sent emails to /var/log/exim4/mainlog

warn ratelimit = 0 / 1h / means "log sent email if counter of sent emails is above 0", which means log all sent emails
Post Reply