Dear, we need to limit the number of email that goes out from a specific website (eg. limit the function mail() to for example 1000email/day). At this time we have created a custom wrapper of the sendmail file. This barely works but is not the best way for sure. Some of you has some solid tools or tips that we can use? Must have: - ability to count the mail for any website hosted on the server (eg. 1000mail max per day for domain1.com, 2000 mail max per day for domain2.com); - must works with any php compilter (so suphp, fastcgi...); Any ideas? Thank you.
We already us policyd with success. But it's work only on smtp relay. My problem is to limit the mail that goes outsite from for example the mail() functions of php. Generally all the mail that goes out with sendmail. They don't goes throught policyd in any case in my experience...
As far as I know, all mail goes trough policyd. Maybe there is an exception rule for 127.0.0.1 or something similar?
Well actually the problem with policyd is that if the spammer change the mail-from or return-path (and this happen always), i can't count correctly the mail with policyd. btw i will open a new thread because probably i will facing another way to solve this, and could be usefull for others users. ty
Yes we have solved. Specifically now we count not the mail from (that is wrong) but, the sasl-user used by the client in order to make the relay. You can choose that when you create the policyd policy.