- Server operating system version
- CentOS Linux 7.9.2009 (Core)
- Plesk version and microupdate number
- Plesk Obsidian Version 18.0.49
I seem to remember reading somewhere some time ago that the system for controlling outgoing mail does not work with email sent by a website (e.g. by a PHP process running under Apache in some way). I did a test to see if this was the case or not. I set an outgoing email limit for a domain to 10 messages per hour. I used a contact form on the site - which sends email to email on another domain - using PHP to send 15 messages in 10 minutes, I then checked at the 'Outgoing Mail Control' page in Plesk. Where it says "attempts to exceed the limits" nothing was showing. I received all 15 emails. This appears to confirm what I thought - it doesn't work with mail sent from a web process.
I then configured another domain to have a limit of 10 messages. I sent 11 messages via an email client on my local PC. The limit kicked in. However - I realised this because sending from my email client ceased to work and I got a message in the client. Good. However; nothing in the Plesk control panel which still reports "no attempts to exceed limits". The main thing is it worked - as for reporting maybe this will be updated after the full reporting period - so not a problem.
But - if this is correct, and my tests appears to confirm this - this means the system does not control for emails sent by websites (in my case PHP running as FPM). This is a pity because this seems to be the most likely case when it could be useful to be able to monitor excess sending.
However! - it seems there is an easy work around for this. I set the limit on domain A.com to be 10 per hour. I configure my web script to send contacts on the site to [email protected] and I have also configured the mail server to forward emails from [email protected] to [email protected]. This causes emails to be send from one email account to another - and the limit kicks in.
This seems to work for me - but I would be interested if someone can confirm that the system does indeed not work to control emails sent from web scripts. Does it say this somewhere in the current documentation?
Thank you
I then configured another domain to have a limit of 10 messages. I sent 11 messages via an email client on my local PC. The limit kicked in. However - I realised this because sending from my email client ceased to work and I got a message in the client. Good. However; nothing in the Plesk control panel which still reports "no attempts to exceed limits". The main thing is it worked - as for reporting maybe this will be updated after the full reporting period - so not a problem.
But - if this is correct, and my tests appears to confirm this - this means the system does not control for emails sent by websites (in my case PHP running as FPM). This is a pity because this seems to be the most likely case when it could be useful to be able to monitor excess sending.
However! - it seems there is an easy work around for this. I set the limit on domain A.com to be 10 per hour. I configure my web script to send contacts on the site to [email protected] and I have also configured the mail server to forward emails from [email protected] to [email protected]. This causes emails to be send from one email account to another - and the limit kicks in.
This seems to work for me - but I would be interested if someone can confirm that the system does indeed not work to control emails sent from web scripts. Does it say this somewhere in the current documentation?
Thank you