custom postfix configuration for local email

  • Hi folks, I recently upgraded to 1.0 and have a question about the right way to change the postfix configuration in /etc/postfix/main.conf.

    I've configured Notifications correctly, and I have no problem getting emails from scheduled jobs in OpenMediaVault.

    My original problem was that after I installed denyhosts, I would get bounced emails like this one:

    I was able to solve the problem by adding the following line to /etc/postfix/
    recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical

    And creating /etc/postfix/recipient_canonical with:

    However, /etc/postfix/ is overwritten any time I make configuration changes through the OMV user interface.

    The question is: Is there a way I can persist my change to /etc/postfix/ so that it's not overwritten?

    The other solution is to configure denyhosts to send emails directly to a specific account instead of to "root@localhost", but I'd like to solve for the general case if I can.

    Any ideas?

  • I was looking for an answer to this question as well.
    I have made some tweaks to - and it's a little frustrating to have to remember to back those changes up, before making changes to parts of the webui-config.

    Atom 330 @ 1.6GHz, 4GB RAM
    2x3TB Data, 1x3TB Parity, SnapRAID + AUFS pool
    Latest OMV running on custom Debain Wheezy, 3.14 Backports kernel

  • I have the same problem with my
    here's what I do for this (not a fix but it's working)

    first make a copy of your

    cp /etc/postfix/ /etc/postfix/

    then edit your .bashrc file to add a new alias

    nano /root/.bashrc

    add the following line :

    alias fixmail='cp /etc/postfix/ /etc/postfix/;service postfix restart'

    now when you make changes in your OMV interface and it breaks your email just ssh your server as root and type : fixmail

    your mails are working again :)

  • The answer to your issue lies in /usr/share/openmediavault/mkconf/postfix.d/10main
    There are a lot of variables pulled from /etc/default/openmediavault there.
    The one you are interested in is OMV_POSTFIX_MAIN_SENDER_CANONICAL_MAPS

    Just add the following line to your /etc/default/openmediavault:


    and regenerate OMV configs.

Participate now!

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