Service 'mail_server' has not been detected (strongly recommended, currently enabled)

Discussion in 'ISPConfig 3 Priority Support' started by Jemt, Feb 25, 2020.

  1. Jemt

    Jemt Member HowtoForge Supporter

    Hi,

    EDIT: Solved - solution in my 4th comment.

    I'm upgrading a server running Debian 8 to Debian 10 (with an upgrade to Debian 9 in between).
    When I run `ispconfig_update.sh` or the ISPConfig installer's update script, I receive warnings such as:
    Service 'mail_server' has not been detected (strongly recommended, currently enabled) do you want to disable it? (yes,no) [yes]:
    I have SMTP/POP3/IMAP, Apache, PHP, MySQL, FTP and more running on this server, so it scares me that it wants to disable these features.
    upload_2020-2-25_17-58-11.png

    Can someone tell me what is going on, and how to fix this problem? I want the upgrade procedure to recognize that these services are in fact running, and that they should not be disabled.

    - Thanks :)

    Jimmy
     

    Attached Files:

    Last edited: Feb 25, 2020
  2. Jemt

    Jemt Member HowtoForge Supporter

    I believe this is the database lookup the update script performs when trying to determine whether these services are enabled or not:
    upload_2020-2-25_18-7-38.png
    Seems fine to me ?!
     
  3. Jemt

    Jemt Member HowtoForge Supporter

    However, the state of mail_server in $conf used in the update script looks like this (notice the installed state which is unset/false/0):
    upload_2020-2-25_18-20-58.png
    So no wonder the script thinks there's an inconsistency problem. I wonder why, though.
     
  4. Jemt

    Jemt Member HowtoForge Supporter

    Worth mentioning, this server was initially established on Debian 7, if memory serves me. So I can't rule out having made a mistake, missing some important ISPConfig specific steps during the Debian upgrades. Usually I just perform the dist upgrade as recommended in the release notes, and install any missing packages I may stumple upon. And naturally I keep ISPConfig up to date using ispconfig_update.sh.
     
  5. Jemt

    Jemt Member HowtoForge Supporter

    It seems lib/installer_base.lib.php determines whether services are installed like this:
    if(is_installed('postfix')) $conf['postfix']['installed'] = true;

    The function is_installed is defined in lib/install.lib.php and uses `which appname` to determine whether the service is installed. But `which postfix` does not produce anything on this server.

    Perhaps `systemctl status appname` would be a better way of detecting whether a service is installed and running ?

    Never the less, these findings led me to investigate $PATH :
    /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

    It seems I'm missing several common paths:
    /usr/local/sbin , /usr/sbin , and /sbin.

    It turns out that `su` no longer updates $PATH with Debian 10 Buster (documented here), so if my session was initiated with an ordinary user, then $PATH reflects that, even when switching to root using `su`. Switching to root using `su -` or `su -l` results in $PATH being overridden with the expected value.

    @till, I think it's fair to assume that other users may experience the same problem. Would it make sense to check $PATH prior to an update or installation, to make sure it seems valid, and issue a warning if e.g. /usr/sbin is missing ?
     
    Last edited: Mar 1, 2020
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The reason for the problem is that you used su command wrong and neither read the ISPConfig installation instructions for Debian 10 nor the Debian 10 upgrade notes from Debian. So there is no issue with ISPconfig or the ISPConfig installer. Please read Debian 10 perfect server guide, it begins with a VERY important part:

    https://www.howtoforge.com/perfect-server-debian-10-buster-apache-bind-dovecot-ispconfig-3-1/

    I'll cite:

     
    Jemt likes this.
  7. Jemt

    Jemt Member HowtoForge Supporter

    Thanks for your answer.
    No, I followed the installation instructions for Debian only (https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html). After all, this is just an upgrade. It worked for Debian 7 to 8 and 8 to 9. I only just learned that I'm supposed to run the ISPConfig installer after a dist-upgrade.
    Personally I add preflights in my shell scripts that protect from incorrect behaviour like this. It makes sense if Debian is the only dist with this (inconsistent) behaviour. Also, I'm not a fan of a script relying on external documentation to function properly :)
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    That's what we do as well and it worked perfectly as you can see in your first post, I'll cite it so you don't have to scroll up:

    So the installer told you that postfix could not be detected.
     

Share This Page