Postfix - how to send maximally 5 emails in 2 minutes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Postfix - how to send maximally 5 emails in 2 minutes

User123
This post has NOT been accepted by the mailing list yet.
I try to set Postfix through the anvil command so that can be sent altogether maximally 5 emails in 2 minutes, seemingly this is not possible as can be sent emails without any limitation. Maybe I have not found the right settings for the master.cf file regarding to the options smtpd and anvil or similar. Many Greetings

main.cf:

anvil_rate_time_unit = 120s
smtpd_client_connection_count_limit = 1
smtpd_client_connection_rate_limit = 1
smtpd_client_recipient_rate_limit = 5
smtpd_client_message_rate_limit = 5
master.cf:

# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#smtp      inet  n       -       -       -       1       postscreen
#smtpd     pass  -       -       -       -       -       smtpd
#dnsblog   unix  -       -       -       -       0       dnsblog
#tlsproxy  unix  -       -       -       -       0       tlsproxy
#submission inet n       -       -       -       -       smtpd
#smtps     inet  n       -       -       -       -       smtpd
#628       inet  n       -       -       -       -       qmqpd
pickup    unix  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
#qmgr     unix  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
relay     unix  -       -       -       -       -       smtp
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       1       scache
Reply | Threaded
Open this post in threaded view
|

Re: Postfix - how to send maximally 5 emails in 2 minutes

User123
This post has NOT been accepted by the mailing list yet.
Actually I have tried everything, apparently Postfix does not work here correctly. I have already read in many forums about this problem but nowhere was found an answer. Once I have read that it should only work if emails are sent to local clients like outlook. However, I'm not sure that it is the fault of the settings in the master.cf file.

Many Greetings
Reply | Threaded
Open this post in threaded view
|

Re: Postfix - how to send maximally 5 emails in 2 minutes

User123
This post has NOT been accepted by the mailing list yet.
It works if are sent emails from useraccounts over a mailclient like Thunderbird to extern email addresses, but I want to limit all outgoing emails so that can be sent through the mailqueue maximally 5 emails in 2 minutes, is this possible. I tested it so:

main.cf
anvil_rate_time_unit = 120s
anvil_status_update_time = 600s
smtpd_client_recipient_rate_limit = 1
smtpd_client_message_rate_limit = 1
smtpd_client_connection_count_limit = 1
smtpd_client_connection_rate_limit = 1

master.cf
smtp      inet  n       -       -       -       -       smtpd
smtp      unix  -       -       -       -       -       smtp
anvil     unix  -       -       -       -       1       anvil