• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved php mail fails for regular users, works for root

tkalfaoglu

Silver Pleskian
I am sure this is something simple, but I am having a senior moment..

The following simple script works for root, but fails for regular users...
$subject = "deneme";
$to_address = "[email protected]";
$msg = "deneme";
$from_name = "kalfaoglu";
$from_address = "[email protected]";
$headers = "From: $from_name<$from_address>\n";
$headers .= "MIME-Version: 1.0\n" .
"Content-Type: text/html; charset=Windows-1254";
mail($to_address, $subject, $msg, $headers);

$ php test.php
Mail handler 'limit-out' said: REPLY:554:5.7.0 Your message could not be sent. The user turgut is not allowed to send email.

versus:

[root@jedi ~]# php test.php
[root@jedi ~]#
 
Yes.. `allow users...` setting is set in plesk settings..
and mail service is enabled for all turguts on the system AFAIK.
 
Thank you very much -- my manually-created sysuser was not in the plesk database indeed.. Once I added that user it was able to send mails..
 
Back
Top