1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Disable a Domain's mail permission

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by CahitE, Jun 27, 2011.

  1. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    I want to disable mail send ability for only one domain
    how should i do this
    Plesk 10.1.x
     
  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    # /usr/local/psa/bin/mail --off domain.com

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

    for details.
     
  3. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    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 ?
     
  4. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    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.
     
  5. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    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 ?
     
  6. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    "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?
     
  7. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    "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
     
  8. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    You can just add

    disable_functions = mail

    into custom domain's php.ini
     
  9. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    Where should i find custom php.ini :) sorry for silly question
     
  10. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    You can use custom domain's php.ini in /var/www/vhosts/domain.com/conf/ directory.
     
  11. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    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
     
  12. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  13. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    [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
     
  14. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Did you reconfigure vhost with httpdmng utility?
     
  15. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    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
     
  16. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    Show me content of php.ini, please.
     
  17. CahitE

    CahitE Basic Pleskian

    19
    60%
    Joined:
    Apr 27, 2010
    Messages:
    98
    Likes Received:
    0
    I've Attached
     

    Attached Files:

  18. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
  19. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,571
    Likes Received:
    1,243
    Location:
    Novosibirsk, Russia
    php.ini per domain will work in 10.3 only when PHP is run over CGI and FastCGI. It will be something like:

     
Loading...