msmtp install leads to OMV uninstall, No Webgui

  • As I found this after my search for 'omv nginx forbidden'


    I realized that I did exactly the same thing: I installed msmtp

    After that the Webgui is gone and nginx reports 'forbidden'. So this is 5 years later as in the thread above and its OMV7, but this problem still exists.

    After I have done the update from 6 to 7 today, msmtp strangely wasn't working anymore.



    Got this error:

    Code
    mail: /usr/bin/msmtp -t: No such file or directory
    sendmail process failed with error code 1

    This is set in /etc/mail.rc: set sendmail="/usr/bin/msmtp -t"

    and /usr/bin/msmtp did exist, so I purged and installed it again. And after that it worked again.


    Now I'm stuck with this desaster. OMV got uninstalled in the process it seems.


    Someone knows whta's going on and howto fix it without new install?


    I think devs would be interessted to get to the bottom of this since I never had any problems on my many machines with debian and msmtp.

    Did anything change in OMV7 with the mail executable?


    I do have a system backup and I could recover /var/www/openmediavault

    I then chown -R openmediavault-webgui:openmediavault-webgui openmediavault


    The Gui apears now but on login I get 500 - Internal Server Error


    From nginx openmediavault-webgui_error.log:

    Code
    server: openmediavault-webgui, request: "POST /rpc.php HTTP/1.1",
    upstream: "fastcgi://unix:/run/php/php8.2-fpm-openmediavault-webgui.sock:" ...
    2025/04/11 15:08:56 [error] 5283#5283: *38 FastCGI sent in stderr:
    PHP message: PHP Warning: require_once(openmediavault/autoloader.inc): Failed to open stream: No such file or directory in /var/www/openmediavault/rpc.php on line 23;
    PHP message: PHP Fatal error: Uncaught Error: Failed opening required 'openmediavault/autoloader.inc' (include_path='.:/usr/share/php:/var/www/openmediavault') in /var/www/openmediavault/rpc.php:23


    I have then re-copied /usr/share/php/openmediavault

    because it was gone too.


    I now get

    400 - Bad Request

    The data model 'rpc.session.login' does not exist.

    upon login

  • permafrost

    Changed the title of the thread from “msmtp install leads to desastrous Webgui crash: No login: Nginx forbidden” to “msmtp install leads to OMV uninstall, No Webgui”.
    • Official Post

    So this is 5 years later as in the thread above and its OMV7, but this problem still exists.

    The so-called problem is irrelevant for the functionality of OMV because it is not in the interest of the project to support a package like msmtp in parallel to the postfix installed by OMV. If the package is installed, the user moves outside the specification of OMV and is therefore on his own.

    • Official Post

    The problem might be that if you install msmtp-mta, this will replace the postfix package which will completely remove openmediavault as consequence. This is how the Debian package management works. As said, you're doing things outside the specs of the OMV project. It is clearly told in the docs that you have to know what you are doing if you install extra packages in the system.


  • votdev

    Added the Label resolved
  • votdev

    Added the Label OMV 7.x
  • The problem might be that if you install msmtp-mta, this will replace the postfix package which will completely remove openmediavault as consequence. This is how the Debian package management works.

    I don't want to steal more of your valuable time... but could you elaborate on why "This is how the Debian package management works." if I install msmtp. Never have I experienced anything like this that a package like open openmediavault or anything else is completely removed just because I install an alternative mail program. Because it seems that it has no effect whatsoever on the omv. Once I install it I can use it. It's not a big deal. I actually think I know what I'm doing.

    • Official Post

    The key is this

    and the line

    Code
    Replaces: mail-transport-agent

    of the msmtp package. This tells the APT package manager that it replaces existing mail-transport-agent packages. And if a package depends on that one that is removed, it is removed as well. And this is the openmediavault package and all it packages it depends on.

    There are several lines in the package control file which enforces the CLI apps to display warnings and active confirmation from the user to perform this action. So please do not wonder if it does not work afterwards.

  • And if a package depends on that one that is removed, it is removed as well. And this is the openmediavault package and all it packages it depends on.

    There are several lines in the package control file which enforces the CLI apps to display warnings and active confirmation from the user to perform this action. So please do not wonder if it does not work afterwards.

    Ok then. I have seen those messages, but overlooked them in a way because there was a very long list of apt autoremove packages mentioned before that and I really didn't expect something like that.

    For me the bundling of a mail app with omv main makes no sense, I still think it should be possible to replace the mail agent without having the main program removed. I mean I still want to use msmtp, I only have to go through this somewhat absurd process where I have to reinstall omv again after installing msmtp. But it is what it is. Thanks for explaining.

    • Official Post

    For me the bundling of a mail app with omv main makes no sense,

    If OMV configures and uses postfix, then why does it not make sense? This is no different than having nginx and php as a dependency.

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.9 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Just for grins I ran the below on my OMV 7. Where is the warning and list of packages that will be removed? Or does that come when one or more of the additional packages begin their install?


    I aborted the install.


    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


  • If OMV configures and uses postfix, then why does it not make sense? This is no different than having nginx and php as a dependency.

    Because the center of my universe is not omv. I usually don't play with omv, it works in the background pretty well but I don't know very much about it. But I have a lot of Linux machines in my network which are all runing on Debian using msmtp, so it was just a nobrainer to install it on this machine as well.

    • Official Post

    Where is the warning and list of packages that will be removed? Or does that come when one or more of the additional packages begin their install?

    msmtp isn't the problem. msmtp-mta is. Because it removes postfix, it removed omv and everything that depends on OMV.


    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.9 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I thought the OP said he installed msmtp, not msmtp-mta?

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


    • Official Post

    If that was the case, it wouldn't have removed OMV.

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.9 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • If that was the case, it wouldn't have removed OMV.

    The OP should correct his original post, including the Subject.

    --
    Google is your friend and Bob's your uncle!


    A backup strategy is worthless unless you have a verified to work by testing restore strategy.


    OMV AMD64 7.x on headless Chenbro NR12000 1U Intel Xeon CPU E3-1230 V2 @ 3.30GHz 32GB ECC RAM.


  • The OP should correct his original post, including the Subject.

    msmtp is the short form. You install apt install msmtp msmtp-mta mailutils, where apt install msmtp msmtp-mta is mandatory and mailutils is not.

    And in the output ryecoaaron posted you see what I mean with all the packages that come up being listed for 'no longer required'.

    The following packages will be REMOVED is just one line of many. That's where command line sucks. And in the context that I just wanted to quick change my mail agent, who would expect such a mess?

    • Official Post

    msmtp is the short form. You install apt install msmtp msmtp-mta mailutils, where apt install msmtp msmtp-mta is mandatory and mailutils is not.

    And in the output ryecoaaron posted you see what I mean with all the packages that come up being listed for 'no longer required'.

    The following packages will be REMOVED is just one line of many. That's where command line sucks. And in the context that I just wanted to quick change my mail agent, who would expect such a mess?

    OMV is an out-of-the-box solution that includes a functionality for sending emails. This requires a mail client and OMV has opted for postfix. This dependency is stored in the package information. The fact that all OMV packages and dependencies are uninstalled when installing another mail client is not due to OMV, but to the way Debian handles the mail client packages. You cannot install two clients in parallel as they are mutually exclusive. This decision was made by the Debian project and not by OMV. I as the developer of OMV really don't look for a user to be able to install another mail client, because then OMV is the wrong solution for him.

  • I as the developer of OMV really don't look for a user to be able to install another mail client, because then OMV is the wrong solution for him.

    I respectfully disagree. I certainly do not criticise Debian for its package handling And You as the developer can of course make that decision, to bundle postfix as a mandatory mail agent for omv. But in my eyes, I don't see that as necessary and helpful. This is still a Debian machine and that leaves me to many options for customization and finetuning as to my likings. Leaving the responsibility for everything with me, I think that's clear.

    Changing the mail agent is one that seems to have no impact on the functionality of omv. At least for me. I have been using it all along since v5. And so I can also assure you that omv is indeed the right solution for me. Thank you for putting so much effort in it.

    • Official Post

    Changing the mail agent is one that seems to have no impact on the functionality of omv.

    It has big impact on how notifications are handled in OMV.



    You as the developer can of course make that decision, to bundle postfix as a mandatory mail agent for omv.

    My decision is just the other way around because the notifications via email are an essential part of OMV and this only works in cooperation with postfix. As I said, OMV is a complete package that provides certain functionality out-of-the-box. The possibility to customize certain things is always taken into consideration but the implementation of certain functions has priority.


    I always say that openmediavault is not webmin. If you have complete control over your system you should not use OMV and rather consider webmin or other solutions.

    • Official Post

    I work with quite a few enterprise products that don't allow me to change the mta. So, this isn't uncommon.

    omv 7.7.9-1 sandworm | 64 bit | 6.11 proxmox kernel

    plugins :: omvextrasorg 7.0.2 | kvm 7.1.8 | compose 7.6.9 | cterm 7.8.7 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.2


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!