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.

Unable to stop exim

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

  1. Mugoma

    Mugoma Well-Known Member

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

    We want to stop exim to do some housekeeping then restart but not working as expected.

    We do:
    # service exim stop
    # service exim status
    # ps -aux | grep exim

    This shows exim is not running. So far so good.

    But:
    1. When we open webmail we can see new emails coming in.
    2. WHM service status shows exim is UP
    3. Process list (via top or WHM) shows exim running

    Obviously it appears exim is till running though the command prompt shows otherwise. Why?
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    517
    Likes Received:
    38
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Go to "Service Manager" in WHM, uncheck exim. Save your changes. Log onto SSH and stop exim using below command

    service exim stop

    Once you have disabled in Service Manager, chkservd won't restart it
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    34,345
    Likes Received:
    1,003
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The previous post is correct. You can disable the service in "WHM >> Service Manager" to ensure it's not automatically restarted by Chkservd. Let us know if that helps.

    Thanks!
     
  4. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    71
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    My understanding is that Chkservd checks and restarts services after 5 minutes. So, that's not the issue.

    Why would Chkservd start a service after a second or two and why would that not show on command prompt?

    If Chkservd started the service wouldn't it show status as running on the command prompt?

    Basically, the question is why there's contradictions between what's happening on the system and what command prompt shows.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    34,345
    Likes Received:
    1,003
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    The status in "WHM >> Server Status" stems from the most recent status report from Chkservd. When stopping Exim manually, do you notice any output in /var/log/chkservd.log before Exim starts running again?

    Thank you.
     
  6. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    71
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    This is still not working.

    I have exim disabled. On the command prompt exim status shows as stopped. But I can still see exim on the process list.
     
  7. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,207
    Likes Received:
    38
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    You can rename the exim restart script. Make sure you have disabled the exim in the service manager section completely.
    rename /etc/init.d/exim and also /scripts/restartsrv_eximd.

    See if that helps.
     
  8. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    71
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    Wouldn't this interfere with normal operation of exim?
     
  9. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,207
    Likes Received:
    38
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    It is a service start and stop script, so once you are done with your housekeeping, you can rename it back again.. It is only to make sure that the system monitoring does not track it and restart it when you housekeeping it.
     
  10. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    71
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    Actually there's nothing wrong with start script.

    Our suspicion is that there's a spammer who's invoking exim directly. That's why the process shows in process list even if service is stopped.

    We have tried changing permission on exim to allow allow root to execute but this seems to stops exim altogether.

    So, at the moment what we need ways to block exim from being directly executed.
     
  11. Mugoma

    Mugoma Well-Known Member

    Joined:
    Aug 1, 2016
    Messages:
    71
    Likes Received:
    4
    Trophy Points:
    8
    Location:
    Nairobi
    cPanel Access Level:
    Root Administrator
    We decided to raise support ticket as it's taking too long to get solution from forum:

    Support ticket: 8405145
     
Loading...

Share This Page