• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Disable a Domain's mail permission

# /usr/local/psa/bin/mail --off domain.com

# /usr/local/psa/bin/mail --help

for details.
 
Dear igorg thank you for response but when i search deeply the problem is bigger.

The user is not sending mail. His site is sending mails (uid 48) so i want to block his site to send mail ;
how should i do this ?
 
As you can see with --help option:

--off <domain> disables mail service for domain

So, mailservice will be completely disabled for domain but not for user.
 
ok then so user will go on sending mails via apache ; as you see 48 is apache id depending on described on the knowladge base. How should i block the apache for current user ?
 
"user will go on sending mails via apache ; as you see 48 is apache id depending on described on the knowladge base"

What do you mean exactly? What is KB article?
 
"If the 'Received' line contains a UID of a user 'apache' (for example invoked by uid 48) - it means that spam was sent through a PHP script. "


http://kb.odin.com/766


so the solution won't protect system from php spamming
 
You can just add

disable_functions = mail

into custom domain's php.ini
 
You can use custom domain's php.ini in /var/www/vhosts/domain.com/conf/ directory.
 
what if not exist :

[root@lin conf]# ls
13082550290.36812900_httpd.include 13083294570.53466300_httpd.include
13082566900.42993600_httpd.include 13087261250.42903500_httpd.include
13082610520.02581100_httpd.include
 
[root@lin conf]# cp /etc/php.ini /var/www/vhosts/maxihayat.net/conf/
[root@lin conf]# ls
13082550290.36812900_httpd.include 13083294570.53466300_httpd.include
13082566900.42993600_httpd.include 13087261250.42903500_httpd.include
13082610520.02581100_httpd.include php.ini
[root@lin conf]# nano php.ini
[root@lin conf]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@lin conf]#


I have edit php.ini as you said but still going on sending mails
 
Yes now i tryed but nothing changed :

[root@lin conf]# /usr/local/psa/admin/bin/httpdmng --reconfigure-domain xxxx.net
[root@lin conf]# service httpd restart
 
php.ini per domain will work in 10.3 only when PHP is run over CGI and FastCGI. It will be something like:

# cat /var/www/vhosts/domain.com/conf/php.ini

PHP:
memory_limit = 128M
max_input_time = 600[/QUOTE]
 
Back
Top