IMPROVEMENT: More flexible notification system

  • I want to try to move away from email notifications, and I've just realised that there's no way to set up alternative notification systems WITHOUT email notifications.


    I'd like to suggest that the notification system be re-imagined to allow the adding of a set of "profiles" which could be redirected to any service based on specific criteria (e.g. integrate something like https://github.com/caronc/apprise).


    For example:


    I want all messages to be sent to Slack on #channel1

    I want WARN messages to be sent to Signal and Email (as well as Slack on #channel1)

    I want DISK FULL messages to be sent to Slack on #channel2


    I know there's the facility for adding scripts in /usr/share/openmediavault/notification/sink.d/ but this is somewhat technical.


    Thanks!


    Gabe

  • KM0201

    Approved the thread.
  • his is an open source project and contributions from the community are welcome.


    OMV provides an interface since many years that allows users to inject other services

    The current implementation has a severe limitation "it is possible to support additional notification systems beside email"

    in other words: First email notifications have to be configured and must work before other notification can be added.

    What is the likelihood of a change to get accepted that would drastically change this core system approach?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Official Post

    The current implementation has a severe limitation "it is possible to support additional notification systems beside email"

    in other words: First email notifications have to be configured and must work before other notification can be added.

    What is the likelihood of a change to get accepted that would drastically change this core system approach?

    As already mentioned, all services OMV is using (mdadm, monitd, ... mostly all userland apps) only know about email. Because of that, a local email service MUST run to retrieve that emails. The post processing of those collected emails depends on the implementation then. But without postfix it is not possible to fetch and post-process them.

  • a local email service MUST run to retrieve that emails.

    well, from my understanding a service that provides just an identical interface (providing sendmail command & API) has to run, not actually a local email service. Is this correct understanding?

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Official Post

    well, from my understanding a service that provides just an identical interface (providing sendmail command & API) has to run, not actually a local email service. Is this correct understanding?

    And how do you want to collect the notifications that are send by userland apps via an email interface to post-process them? I mean, if i understand your question correctly, you can implement a SMTP server yourself to collect them, but hey, i think this time can be used for more useful things.

    • Official Post

    Seems like you could use something like this and set OMV's smtp server to the container - https://github.com/KostyaEsmukov/smtp_to_telegram or https://github.com/YoRyan/mailrise

    omv 7.4.10-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.14 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    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!

  • Wouldn't a wrapper to sendmail work to retrieve all emails from any tool?


    The wrapper's configuration would then decide what to do with provided information.

    i.e.:

    • email (just as today)
    • only post notification on any instant messaging tool that has a plugin
    • or email and post notification
    • or whatever someone cold come up with in the future (including pigeon carrier or https://www.rfc-editor.org/rfc/rfc2549)

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Official Post

    Wouldn't a wrapper to sendmail work to retrieve all emails from any tool?

    You are re-implementing what apprise seems to do. If you can spin up a container that ingests emails and that only requires changing the smtp server on OMV, why not use that? Anything else is a lot of work with very few users and complicated the OMV web interface.

    omv 7.4.10-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.14 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    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!

    • Official Post

    IMO everything already exists in OMV; emails will be fetched with postfix, the interface to support other notifications services already exists. The only thing to do is that someone who wants to have this feature must provide a patch/PR that configures postfix that way to run and collect emails but do not forward them to an external email provider. There are also code changes necessary in the OMV notification configuration and UI, but if someone really needs that feature, everything is there. I could do it in theory, but i am absolutely not interested in wasting my private time for this feature. There are other things i'm more interested to see in OMV and i like to work on.

  • but i am absolutely not interested in wasting my private time for this feature

    that was my reason for asking


    What is the likelihood of a change to get accepted that would drastically change this core system approach?

    an answer wasn't provided yet

    omv 6.9.6-2 (Shaitan) on RPi CM4/4GB with 64bit Kernel 6.1.21-v8+

    2x 6TB 3.5'' HDDs (CMR) formatted with ext4 via 2port PCIe SATA card with ASM1061R chipset providing hardware supported RAID1


    omv 6.9.3-1 (Shaitan) on RPi4/4GB with 32bit Kernel 5.10.63 and WittyPi 3 V2 RTC HAT

    2x 3TB 3.5'' HDDs (CMR) formatted with ext4 in Icy Box IB-RD3662-C31 / hardware supported RAID1

    For Read/Write performance of SMB shares hosted on this hardware see forum here

    • Official Post

    an answer wasn't provided yet

    He said a PR must be provided. Hard to say whether it would be accepted until it exists. So, it is pointless to ponder if no one is going to create it.

    omv 7.4.10-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.14 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    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 seriously think this should be implemented. Unfortunately I am not capable of doing these kind of things. But it would be great if Email can be fetched locally (and not be sent out to an smtp server" and then from there on all notification stuff continues. In the UI when Mail notification is enabled, then the fetched Mail from the userland apps are forwarded just like now, and if not enabled, notifications could still be used to trigger functions anyone can do..

    I am not sure how I would have to add a sink in sink.d for it to work? Is any script in that folder just executed when a notification is send? Can I test it with the "send test notification" button in the WebUI ?

  • The most straight forward way to do this is to have Postfix configured to handle local delivery of email. Some years ago I had it set up this way, but grew tired of having to restore the configuration after everytime OMV decided to overwrite it.

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


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • Why not using the tools which are available and work well on OMV? I haven´t reconfigure postfix and have notifications on pushover.


    1. Docker with mailcatcher

    2. Configure OMV to send via mailcatcher (host = IP of OMV, post = post from mailcatcher config)

    3. Add third party notification tools as described in OMV Documentation

    I´m using pushover and this configuration didn´t break after upgrading to OMV7

    • New
    • Official Post

    I gave a way for people to modify postfix without having OMV overwrite it.... Well, OMV will overwrite it but then the added will file will correct it.

    New option to disable some or all noncritical emails · Issue #1778 · openmediavault/openmediavault
    This is on a fresh install of openmediavault_7.0-32-amd64.iso with all updates ran immediately after. Enabling email notifications seems like a very useful…
    github.com

    omv 7.4.10-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.14 | compose 7.2.14 | k8s 7.3.1-1 | cputemp 7.0.2 | mergerfs 7.0.5 | scripts 7.0.9


    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!


  • Not everyone knows all the tools available for this kind of things. Btw your link for OMV documentation also goes to mailcatcher docker

Participate now!

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