Am 24.10.2014 um 22:41 schrieb Rod K:
On 10/24/2014 2:47 PM, Julio Cesar Covolato wrote:
Hi.
Hello!
Is there a way to limit connections from web applications on the same
server for postfix?
The web application sends messages via smtp on localhost (127.0.0.1:25).
Need to limit the maximum 5k messages per hour. Is that possible?
Regards
Using PHP's mail() function which sends via 25 is A Bad Thing
mail() don't use TCP, it uses pickup/sendmail
Use something like phpmailer class to use submission
and a policy server to rate limit
don't change the fact that a web-app can't handle rate-limiting and you
just lose mail which exceeds the limit - in any case you need to fix or
just remove the vulnerable web-application or end with randomly lost
legit mail
what should the php-app do if the MTA rejetcs the mail beause you hit
the rate-control? queue it? hwo and where - that's why it talks to the
MTA instead to the final MX