Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Prevent a cpanel user from sending email entirely?

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

  1. M001

    M001 Member

    Joined:
    Aug 30, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    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,366
    Likes Received:
    6
    Trophy Points:
    168
    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:
    56
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. HostingH

    HostingH Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    126
    Likes Received:
    18
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, you can also use ConfigServer Mail Manage (cmm) to mange the mails.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. M001

    M001 Member

    Joined:
    Aug 30, 2011
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    51
    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:
    6
    Trophy Points:
    168
    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.

     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,133
    Likes Received:
    1,932
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    11
    Trophy Points:
    168
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    I believe it should be:
    Code:
    [PATH=/home/username/public_html]
    disable_functions = mail
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice