[How to] Set an email sender for OMV emails

  • Hi people,


    During my testing with OMV (version 5) I discovered a behaviour that I really didn't like: majority of emails are sent with the sender root, only in rare occasions the email address is used.
    This can cause two issues:

    • OMV emails might go into spam. Also receiving emails from root it not nice.
    • Some provides simply do not support this configuration. One of them is Zoho Mail, which I use. When I configured this provider, I was not getting emails from OMV and logs were throwing errors about " Relaying disallowed error", a message received from the SMTP Server.

    That's what my provider says:


    Relaying disallowed error



    When the email address (or login credentials) you have provided in the application does not match the email address (or credentials) of your account's outgoing server, you will see a 'Relaying Disallowed' error when you attempt to send an email. The SMTP client will not be able to send the email because of the email address mismatch.
    This can happen when an email address is used as default in a coded program or when you have misspelled the email address while configuring your email inbox. You will receive emails without any issues. To resolve the 'Relaying Disallowed' error, you need to correct the email address provided.

    However there is no such option in OMV. I believe it should be added to the GUI, should be a basic change. Should I submit a product request?


    FIX
    I have found an easy fix for this issue.


    Connect to your server in SSH and edit the following file /etc/postfix/smtp_header_checks with the following:


    Code
    #Fix sender
    
    
    /^From: (.*)/ REPLACE From: SenderName <server@yourwebdomain>

    Save the file and restart postfix: service postfix restart
    From now on emails will be sent if your provider enforces/verifies the email address, and they will definitely appear better to your eyes.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

    • Offizieller Beitrag

    Those emails are sent as root because they are system emails (probably cron). If you want it to go to a different address, modify /etc/aliases and then run newaliases. Whether OMV should change this or not is a different question.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • Those emails are sent as root because they are system emails (probably cron). If you want it to go to a different address, modify /etc/aliases and then run newaliases. Whether OMV should change this or not is a different question.

    Yes, cron jobs are sent with the 'root' sender, but it does not make sense in my opinion. And breaks my email provider.


    Postfix should already be configured to replace root with the configured email address.

    I encountered this issue about a month ago using whatever was the last version of OMV5. I can repeat the test if you want. By the way, as ryecoaaron mentioned, cron jobs are sent as "root".

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

    • Offizieller Beitrag

    Yes, cron jobs are sent with the 'root' sender, but it does not make sense in my opinion. And breaks my email provider.

    This is a Debian default. gmail has no problem with it.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


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


    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!

  • This is a Debian default. gmail has no problem with it.

    Yes, I know Gmail works fine but it's a cosmetic issue too. Potentially other mail providers could break.

    and because of that OMV configures Postfix to replace that name with it’s real email address.
    Now we need to find out why postfix is not doing that.

    I don't know if you want to go down this route, but my fix has the highest priority and every email is sent using those settings.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

  • As said and shown, postfix is already configured to handle such situations. The question now is why it does not work.

    Hey, just wanted to let you know the issue does not occur any more.
    Cron jobs are now received with the sender Cron Daemon, so I think it is working correctly now.


    After reporting the issue here, I managed to replicate the issue in my following test installs, but it's been a while I haven't seen the issue.

    OMV BUILD - MY NAS KILLER - OMV 6.x + omvextrasorg (updated automatically every week)

    NAS Specs: Core i3-8300 - ASRock H370M-ITX/ac - 16GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker Apps), Several HDDs (Data) w/ SnapRAID - Fractal Design Node 304 - Be quiet! Pure Power 11 350W


    My all-in-one SnapRAID script!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!