Getmail cron job run every 5 minutes - remove it

Discussion in 'General' started by pecka33, Dec 8, 2021.

  1. pecka33

    pecka33 Member

    Hello, i have a problem. I dont know how and what should i check, but in my syslog i can see that every 5 minutes run cron job for getmail

    Dec  8 08:05:01 hd518 CRON[190835]: (getmail) CMD (/usr/local/bin/ > /dev/null 2>> /dev/null)
    Dec  8 08:10:01 hd518 CRON[191188]: (getmail) CMD (/usr/local/bin/ > /dev/null 2>> /dev/null)
    Dec  8 08:15:01 hd518 CRON[191384]: (getmail) CMD (/usr/local/bin/ > /dev/null 2>> /dev/null)
    I am not using getmail, before few days i did clean install of debian 11 and after that remove some packages i dont need, for example getmail. I checked my cron jobs, i list it use crontab -l, but i can see there only
    43 0 * * * "/root/"/ --cron --home "/root/" > /dev/null
    * * * * * /usr/local/ispconfig/server/ 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    * * * * * /usr/local/ispconfig/server/ 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    I checked folders in etc with name cron, but can not found any tasks with getmail. Any idea how can i stop it? I use latest debian with latest ispconfig, i dont use fetch emails etc.

    Content of file is

    set -e
    cd /etc/getmail
    for file in *.conf ; do
      if [ $file != "*.conf" ]; then
        rcfiles="$rcfiles -r $file"
    #echo $rcfiles
    if [ -f /tmp/.getmail_lock ]; then
      echo 'Found getmail lock file /tmp/.getmail_lock, we quit here.'
      touch /tmp/.getmail_lock
      if [ "$rcfiles" != "" ]; then
        /usr/bin/getmail -v -g /etc/getmail $rcfiles || true
      rm -f /tmp/.getmail_lock
    Folder for /etc/getmail is empty.
    Thank you for your help.
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Examine the files in directories
    ls -ldh /etc/*cron*
    If it is not started there, check all users crontabs.
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    That is from ISPConfig (and I'm moving this post to the correct forum). You can run 'crontab -u getmail -e' to edit the cronjob (eg. to comment the line out) or 'crontab -u getmail -r' to remove it. It will probably get added back each time you update ISPConfig.
  4. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I am not sure whether this script can be customized via conf-custom folder to resolve it in such a way but I think this script was setup by ISPConfig installer if "if(is_user('getmail')" is true therefore my guess is that it should not be setup again if it is false i.e. no getmail app is installed (as ISPConfig installer will check this via "if(is_installed('getmail')) $conf['getmail']['installed'] = true;"). I guess. :rolleyes:
  5. Strontium

    Strontium New Member

    I have this in /var/spool/cron/crontabs/getmail:

    */5 * * * * /usr/local/bin/ > /dev/null 2>> /dev/null
  6. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    So, what do you want to do? I think this thread is about disabling getmail totally and my view is ISPConfig won't enable it again in the future if getmail is not installed after it is uninstalled.

Share This Page