The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Prevent a cpanel user from sending email entirely?

Discussion in 'E-mail Discussions' started by M001, Jun 27, 2013.

  1. M001

    M001 Member

    Joined:
    Aug 30, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi guys,

    I just want to stop a certain user from being able to use my exim server. Is there something simple I can add to config file or set this in WHM?
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Move the domain entry from /etc/localdomains to /etc/remotedomains

    Obviously would apply to all users of the domain.
     
  3. faisikhan

    faisikhan Well-Known Member

    Joined:
    Dec 12, 2011
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Islamabad, Pakistan
    cPanel Access Level:
    Root Administrator
    And if we want only One user of a domain, should we use the above process as well?
     
  4. HostingH

    HostingH Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    73
    Likes Received:
    3
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you can also use ConfigServer Mail Manage (cmm) to mange the mails.
     
  5. M001

    M001 Member

    Joined:
    Aug 30, 2011
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Sorry, I'm confused. How would I do it via their username? The reason I don't want to do it via domain is because i'm trying to limit a user who constantly has insecure wordpress files and his account is sending spam from "username@my.server.name.com" instead of his own domain. I would not want to block emails for my domain by adding my.server.name.com to that file, right?
     
  6. stdout

    stdout Well-Known Member

    Joined:
    Apr 10, 2003
    Messages:
    189
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Nelspruit, Mpumalanga, South Africa
    cPanel Access Level:
    Root Administrator
    Changing the domain's MX is Not going to prevent the account from sending Email.
    Are you aware of the new Mail-features available under WHM > Modify Account? Use that.

     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You could disable all PHP mail on the server or for specific accounts by using the php.ini file. You can do this globally by adding "mail" to "disable_functions =" in /usr/local/lib/php.ini or for a single account using the path directive at the bottom of the php.ini file.

    Code:
    [PATH=/home/username/public_html]
    disable_functions = mail
    The following threads may also be useful:

    Methods to increase security with suPHP
    PHP mail sending emails not related to domain name

    Thank you.
     
  8. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    I believe it should be:
    Code:
    [PATH=/home/username/public_html]
    disable_functions = mail
     
Loading...

Share This Page