Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section General Discussion Debian/Ubuntu
  • Search

Limit emails per hour per domain

Debian/Ubuntu related topics
Post Reply
  • Print view
Advanced search
41 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next
joni
Posts: 60
Joined: Sat Aug 27, 2016 9:22 pm

Os: Ubuntu 18x
Web: nginx + php-fpm
Re: Limit emails per hour per domain
  • Quote

Post by joni » Tue Nov 21, 2017 7:07 pm

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?
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: Limit emails per hour per domain
  • Quote

Post by dpeca » Wed Feb 21, 2018 4:31 pm

/etc/exim/exim.conf

Steps are the same.
Top

ServerHost
Posts: 25
Joined: Fri May 05, 2017 12:18 am

Re: Limit emails per hour per domain
  • Quote

Post by ServerHost » Tue Feb 27, 2018 4:14 pm

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.
Top

DarthVader
Posts: 31
Joined: Wed Jul 13, 2016 1:35 pm

Re: Limit emails per hour per domain
  • Quote

Post by DarthVader » Tue Feb 27, 2018 7:08 pm

File: /etc/exim/exim.conf
Section: acl_check_mail

deny message = "Slowdown"
log_message = "Ratelimit overload"
ratelimit = 60 / 1h / strict / $sender_host_address
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: Limit emails per hour per domain
  • Quote

Post by MAN5 » Tue Mar 20, 2018 12:06 pm

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.
Top

ServerHost
Posts: 25
Joined: Fri May 05, 2017 12:18 am

Re: Limit emails per hour per domain
  • Quote

Post by ServerHost » Tue Jul 10, 2018 2:47 pm

How to exclude server hostname from limit?

Do not limit e-mails from daemon@hostname, root@hostname, admin@hostname, xxxxxx@hotname
Top

MAN5
Posts: 86
Joined: Sun Jan 31, 2016 4:14 am

Os: Ubuntu 15x
Web: apache + nginx
Re: Limit emails per hour per domain
  • Quote

Post by MAN5 » Tue Jul 10, 2018 2:54 pm

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]
Top

ServerHost
Posts: 25
Joined: Fri May 05, 2017 12:18 am

Re: Limit emails per hour per domain
  • Quote

Post by ServerHost » Mon Jul 23, 2018 6:29 pm

MAN5 wrote: ↑
Tue Jul 10, 2018 2:54 pm
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]
Thanks but it did not work.
Top

alexcy
Posts: 256
Joined: Sun Jun 01, 2014 11:24 pm
Contact:
Contact alexcy
Website

Os: Ubuntu 15x
Web: nginx + php-fpm
Re: Limit emails per hour per domain
  • Quote

Post by alexcy » Wed Aug 08, 2018 6:19 pm

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?
Top

boxygen
Posts: 23
Joined: Tue Aug 21, 2018 7:54 am

Os: CentOS 6x
Web: apache + nginx
Re: Limit emails per hour per domain
  • Quote

Post by boxygen » Sun Aug 16, 2020 11:43 am

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

Code: Select all

acl_not_smtp = acl_not_smtp
put the below code after the word begin acl

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
Find the word

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
Top


Post Reply
  • Print view

41 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Return to “Debian/Ubuntu”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password