Hi there,
I have icinga2 with icingaweb2 basic setup. i would like to setup email notifications for a specific service.
I realized that the mailutils was not installed so i have installed it. There is an internal exchange 2007 in the lan so i set the posfix to use relay. When I test to send email from commandline it always fails.
–5D2A64A9.1573485635/srvcheckmk.mydomain.local
Content-Description: Delivery report
Content-Type: message/delivery-statusReporting-MTA: dns; sserverk.mydomain.local X-Postfix-Queue-ID: 5D2A64A9 X-Postfix-Sender: rfc822; root@sserverk Arrival-Date: Mon, 11 Nov 2019 16:20:30 +0100 (CET) Final-Recipient: rfc822; user2@domain.com Original-Recipient: rfc822;user2@domain.com Action: failed Status: 5.7.1 Remote-MTA: dns; domain.axpe.com Diagnostic-Code: smtp; 550 5.7.1 Sender ID (PRA) Domain Does Not Exist Final-Recipient: rfc822; juserb@domain.com Original-Recipient: rfc822;juserb@domain.com Action: failed Status: 5.7.1 Remote-MTA: dns; mail.domain.com Diagnostic-Code: smtp; 550 5.7.1 Sender ID (PRA) Domain Does Not Exist --5D2A64A9.1573485635/sserverk.mydomain.local Content-Description: Undelivered Message Content-Type: message/rfc822 Return-Path: <root@sserverk> Received: by srvcheckmk.axpenet.local (Postfix, from userid 0) id 5D2A64A9; Mon, 11 Nov 2019 16:20:30 +0100 (CET) Subject: Subject To: <juserb@domain.com>,<fuserd@domain.com> X-Mailer: mail (GNU Mailutils 2.99.99) Message-Id: <20191111152030.5D2A64A9@srvcheckmk.mydomain.local> Date: Mon, 11 Nov 2019 16:20:30 +0100 (CET) From: root@srserverk (root) Test body --5D2A64A9.1573485635/srawecwek.mydomain.local--
?
This is my /etc/posfix/main.cf
root@serverubu:/etc/postfix# cat main.cf
See /usr/share/postfix/main.cf.dist for a commented, more complete version
Debian specific: Specifying a file name will cause the first
line of that file to be used as the name. The Debian default
is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = noappending .domain is the MUA’s job.
append_dot_mydomain = no
Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h
readme_directory = no
TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scacheSee /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = serverk.mydomain.local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, axpenet.local, srvcheckmk, localhost.localdomain, localhost
relayhost = [mail.axpe.com]
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 172.26.2.0/16 172.26.0.0/16
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
transport_maps = hash:/etc/postfix/transport
default_transport = smtpenable SASL authentication
smtp_sasl_auth_enable = yes
disallow methods that allow anonymous authentication.
smtp_sasl_security_options =
where to find sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
Enable STARTTLS encryption
smtp_use_tls = yes
where to find CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
Does posfix first need to be able to send emails before icinga can use it right?
thank you