Limit emails per hour per domain
Re: Limit emails per hour per domain
Hallo, in Centos 7 what file should be dited instead thi File to edit: /etc/exim4/exim4.conf.template
and are the steps the same?
and are the steps the same?
Re: Limit emails per hour per domain
/etc/exim/exim.conf
Steps are the same.
Steps are the same.
-
- Posts: 25
- Joined: Fri May 05, 2017 12:18 am
Re: Limit emails per hour per domain
How to do to limit by domain, in the same way as it is done in cpanel? This script only limits the per-user and email account. Not limited by domain.
Also it has a problem it limits the emails of the root user and admin.
Also it has a problem it limits the emails of the root user and admin.
-
- Posts: 31
- Joined: Wed Jul 13, 2016 1:35 pm
Re: Limit emails per hour per domain
File: /etc/exim/exim.conf
Section: acl_check_mail
deny message = "Slowdown"
log_message = "Ratelimit overload"
ratelimit = 60 / 1h / strict / $sender_host_address
Section: acl_check_mail
deny message = "Slowdown"
log_message = "Ratelimit overload"
ratelimit = 60 / 1h / strict / $sender_host_address
Re: Limit emails per hour per domain
1. $sender_address_domain > will limit per domain.
2. $sender_address > Will limit according to the email send authenticated user.
(i.e) if you use sendmailer/PHPmailer - it will take the hosting account name as a sender to count.
If you use SMTP auth (like outlook/thunderbird etc..) - the sender email address as SMTP auth - the email-ID will be counted.
2. $sender_address > Will limit according to the email send authenticated user.
(i.e) if you use sendmailer/PHPmailer - it will take the hosting account name as a sender to count.
If you use SMTP auth (like outlook/thunderbird etc..) - the sender email address as SMTP auth - the email-ID will be counted.
-
- Posts: 25
- Joined: Fri May 05, 2017 12:18 am
Re: Limit emails per hour per domain
How to exclude server hostname from limit?
Do not limit e-mails from daemon@hostname, root@hostname, admin@hostname, xxxxxx@hotname
Do not limit e-mails from daemon@hostname, root@hostname, admin@hostname, xxxxxx@hotname
Re: Limit emails per hour per domain
Just a simple sample:
#for PHP scripts, sendmailer, phpmailer, limit per domain
acl_not_smtp:
deny message = $reply_address Sending too much emails - rate overlimit = $sender_rate / $sender_rate_period
senders = !lsearch;/server-path-to-file/exim-whitelist
ratelimit = 60 / 60m / strict / $reply_address
accept
And create a file '/server-path-to-file/exim-whitelist' >>> put your prime emails. (eg) [email protected], [email protected]
#for PHP scripts, sendmailer, phpmailer, limit per domain
acl_not_smtp:
deny message = $reply_address Sending too much emails - rate overlimit = $sender_rate / $sender_rate_period
senders = !lsearch;/server-path-to-file/exim-whitelist
ratelimit = 60 / 60m / strict / $reply_address
accept
And create a file '/server-path-to-file/exim-whitelist' >>> put your prime emails. (eg) [email protected], [email protected]
-
- Posts: 25
- Joined: Fri May 05, 2017 12:18 am
Re: Limit emails per hour per domain
Thanks but it did not work.MAN5 wrote: ↑Tue Jul 10, 2018 2:54 pmJust a simple sample:
#for PHP scripts, sendmailer, phpmailer, limit per domain
acl_not_smtp:
deny message = $reply_address Sending too much emails - rate overlimit = $sender_rate / $sender_rate_period
senders = !lsearch;/server-path-to-file/exim-whitelist
ratelimit = 60 / 60m / strict / $reply_address
accept
And create a file '/server-path-to-file/exim-whitelist' >>> put your prime emails. (eg) [email protected], [email protected]
Re: Limit emails per hour per domain
I believe that this should be implemented in the default Vesta configuration. Maybe more loose limits but it shouldn't be left unlimited. What do you think?
Re: Limit emails per hour per domain
Summarizing this Discussion for Emails Limit Per Domain Per Hour
File to edit: /etc/exim4/exim4.conf.template
Find the word begin acl
put the below code before the above word
put the below code after the word begin acl
Find the word
acl_check_rcpt:
accept hosts = :
put the below code below the above words
File to edit: /etc/exim4/exim4.conf.template
Find the word begin acl
put the below code before the above word
Code: Select all
acl_not_smtp = acl_not_smtp
Code: Select all
# for PHP scripts, limit per vesta user
acl_not_smtp:
deny message = The $sender_address_domain domain is sending too much emails - rate overlimit = $sender_rate / $sender_rate_period
ratelimit = 20 / 1h / $sender_address_domain
accept
acl_check_rcpt:
accept hosts = :
put the below code below the above words
Code: Select all
# for SMTP authenticated users, limit per email account
deny message = Email account $sender_address_domain is sending too much emails - rate overlimit = $sender_rate / $sender_rate_period
ratelimit = 20 / 1h / $sender_address_domain