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.

TIP: Monitoring IMAP server (xinetd)

Discussion in 'General Discussion' started by ecoutez, Aug 18, 2002.

  1. ecoutez

    ecoutez Well-Known Member

    Joined:
    May 23, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    0
    If you're now running CPanel's IMAP daemon, you may want to ensure that xinetd stays operational. It's fairly simple to add this to the existing chkserv monitoriing...

    - create a file /etc/chkserv.d/imapd with contents...
    #SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
    service[imapd]=143,. LOGOUT,* OK,/etc/rc.d/init.d/xinetd start

    - chown root.root /etc/chkserv.d/imapd
    - chmod 600 /etc/chkserv.d/imapd
    - /etc/rc.d/init.d/chkservd restart

    This will also add the status of imapd to WHM and CP &service status& lights.

    Adding a monitor for the POP3 server would be fairly similar, though the contents of the /etc/chkserv.d/cppop file (or whatever you prefer to call it) would be something like this. (I haven't tested this yet, so no guarantees on this one)...
    service[cppop]=110,QUIT,+OK POP3,/usr/local/cpanel/bin/cppop

    Enjoy!

    - Jason
     
  2. ecoutez

    ecoutez Well-Known Member

    Joined:
    May 23, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    0
    Well, since I mentioned the POP server, here are my results.

    When I telnet to localhost 110, I get...
    +OK POP3 [DarkORB cppop 1.2] at [127.0.0.1] ()

    So I should be able to match the &+OK POP3& portion, or at least just &+OK&. Strangely enough, I couldn't get the server to agree that &+OK POP3& is the same as &+OK POP3&... so I tried shortening the match to just &+OK& and still had problems. In /var/log/chkservd.log I would get something like this:
    [pop3: [+O != +O]
    -Restarting pop3....
    system: /usr/local/cpanel/bin/cppop
    ]

    +0 looks equal to +0 to me. *shrug*

    Finally I was only able to get it working matching only the &+&. So my /etc/chkserv.d/pop3 looks like:
    #SERVICE = PORT, SEND, RESPONSE, RESTART COMMAND
    service[pop3]=110,QUIT,+,/usr/local/cpanel/bin/cppop

    Maybe chkserv queries the port in some other manner. At least this works... though not quite as elegantly as I would have hoped.

    - Jason
     
Loading...

Share This Page