Notification email is received from "icinga@mydomain.com"

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Greetings,


    Whenever I receive any notification from Icinga it is from "icinga@mydomain.com". I want to change it to mon@mydomain.com. What am I missing? my postfix config is below. Just an FYI, I changed the $my domain to my domain, my $origin to my origin and relayhost to my Exchange Server.


    Thanks

  • Hi,


    Thanks for the reply. I changed all the values from $user.email$ to $mon$, however, the email stopped working after that.


    What did I do wrong?

  • I don't know your configuration. What did you modify to explicitly set the sender? By default that's the daemon user's alias configured in your MTA.

  • Everything's default. I just added the above code to postfix and it started sending emails.

  • FYI, I am using Postfix


    I tried to find daemon user's alias configured in my MTA, but cant find it. Any help will be appreciated.


    Thanks

  • Postfix has a config setting where aliases are stored, likely /etc/aliases. You'll need to define them there, e.g. one for the icinga2 daemon user.

  • AFAIK the /etc/aliases are used for local delivery e.g. mails to the "root" user should delivered to the "administrator" user.


    Have you tried the sender_canonical_maps setting?


    1. Modify your Postfix configuration file # vim /etc/postfix/main.cf

    2. Add sender_canonical_maps = hash:/etc/postfix/sender_canonicalto your config

    3. Create the given file # vim /etc/postfix/sender_canonical

    4. Add icinga mon@yourdomainhere.tld (on Debian based Distributions nagios mon@yourdomainhere.tld) to that file

    5. Modify the file permissions to ensure that only "root" can read/modify it # chmod 600 /etc/postfix/sender_canonical

    6. Create the Postfix lookup table # postmap /etc/postfix/sender_canonical

    7. Restart/Reload your Postfix daemon


    When Icinga now sends a mail your should see that it is send by "mon@yourdomainhere.tld".


    Some mail provider expect that the authenticated user e-mail address is the same as the sending e-mail address, so you can't send from user "person1@yourdomainhere.tld" a mail with "mon@yourdomainhere.tld" as sender address.

  • Without any logs and configuration files it is hard to find the issue, please provide such. Please show us your current Postfix configuration and your current notification definitions for Icinga 2.


    A little side note: This isn't a ticket system where you drop your questions and waiting for someone to help and answer it. This is a forum where we give tips/hints and guiding you into the right direction. You will not get a copy & paste solution here. You should always try to understand the things that you get as answer.


    Please see the FAQ

  • Sorry for the inconvenience. I will post the postfix questions on a different forum.


    Thanks for all your help!

  • Post by ashahid ().

    This post was deleted by the author themselves ().
  • Post by ashahid ().

    This post was deleted by the author themselves: Duplicate ().