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.

Block cron emails

Discussion in 'E-mail Discussions' started by Mugoma, Apr 23, 2017.

Tags:
  1. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    74
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    Hello,

    We're seeing a lot of spam emails via cron. Is it possible to block all emails via cron, esp. for non-root users?

    We tried using /etc/cron.deny but it's not working.

    Thanks.
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,399
    Likes Received:
    52
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    You can either try adding the below line at the end of the specific cron

    >/dev/null 2>&1

    And also, you can set a variable at the top of the user cron file:

    MAILTO=""
     
  3. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    74
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    The mail logs show mails from cron but we don't where those cron jobs are.

    We just want to block all cron jobs except those run by the system.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know what entries you added to this file? Did you try restarting the crond service after setting up that file?

    Thank you.
     
Loading...

Share This Page