Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Postfix smarthost: limit the number of message to recipient by time interval

Status
Not open for further replies.

mondji

IS-IT--Management
Dec 28, 2020
1
CA
I am trying to configure a postfix server as a smarthost. For authorized email addresses, I have emails sent directly to the relay.
For unauthorized email addresses, I reject send it with the message "error: mail is not deliverable". But I want to allow certain email addresses
temporarily for testing. I want to send in intervals of 15 minutes at most 10 messages per recipient. Here is my configuration:

/etc/postfix/transport

authorized@authorizeddomain relay:[relay_IP]
username1@domain1 testing:[relay_IP]
username2@domain3 testing:[relay_IP]
username3@domain3 testing:[relay_IP]

* error:mail is not deliverable

/etc/postfix/master.cf

testing unix - - n - 10 smtp
-o smtp_header_checks=regexp:/etc/postfix/test_header_checks

/etc/postfix/main.cf
...
testing_destination_concurrency_failed_cohort_limit = 1
testing_destination_concurrency_limit = 10
testing_destination_rate_delay = 15m
...

So during my tests I want to send eg at most 10 messages at the same time to username1 @ domain1 in the interval of 15 min.
But I can't seem to figure out how to do it. When I send 10 simultaneous messages to username1 @ domain1, there is only one message
which is sent every 15 min.
What do I want to do is possible? If so can someone help me?
Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top