On 10/24/2014 4:47 PM, li...@rhsoft.net wrote:


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
Correct. My point was that, in the most common Apache/PHP configuration, there is no way to tell which site on a shared host sent the mail. Using SASL via submission and a policy server to rate limit, the OP gets his problem solved AND should a site be sending spam a quick check of the logs and he'll know which site generated it.

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
And rate limiting would force the user to do just that, no?

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
WTF? How is the mail admin supposed to solve this problem for the user? If the user's script doesn't handle it there is nothing the mail admin can do about it. Unless you just want to accept all email from localhost and deliver it no matter what.

Furthermore, even if the user's script isn't handling rejections he should be checking his error logs, no?

Reply via email to