• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Limit number of emails send by PHP mail function

MislavO

Regular Pleskian
Hello, as title says, I'm trying to limit number of emails send by php mail function.

As temporary solution I've disable this option for few domains because spammers are giving me a hard time, but I'm looking for solution how to limit this server-wide. So far I'm unable to find solution on google and I've found only this:

http://www.cyberciti.biz/faq/postfix-limit-incoming-or-receiving-email-rate/
http://serverfault.com/questions/43...f-mails-causing-problems-on-centos-6-plesk-10

Altough this is not reflecting sending mail with php mail function. Thanks in advance
 
Last edited:
Hi, MislavO

You can try to remove localhost (127.0.0.1) from white list in Server-Wide Mail Settings.
This will force PHP web users to use authenticated SMTP connections(using mailboxes).
 
Thanks for the info, altough this is not solution.

I have the same problem and I couldn't find any solution for this. I was thinking to block mail function and force users to use smtp-auth but I want to avoid this.
Could you find any solution for this?
 
MislavO, if you're using Postfix as MTA you can configure a non-SMTP milter for processing emails submitted by the local sendmail wrapper, which is used by PHP mail() function. See http://www.postfix.org/MILTER_README.html#config
You can use something like "mailfromd" as such a milter to apply different sorts of filtering to the submitted email.
If you want to restrict submitted email to just several users only (root, for example) look at "authorized_submit_users" Postfix parameter.
 
Back
Top