email notification not working for AWX

Hi ,

I have configured job execution start/finished status to be sent via email (local host)
I have configured SMTP server with the following options -

Postfix config file “main”

queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

mail_owner = postfix

myhostname = awxuser.example.com

myorigin = $myhostname

inet_interfaces = $myhostname, localhost inet_protocols = all mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 192.168.122.1/24, 127.0.0.0/8

AWX UI -
port - 25
host - localhost
receiver = root@awxuser.example.com
sender = elb@awxuser.example.com

Yet notification failure message is received with message “test notification failed”

Any help would be great as i am stuck at this for long .

Thanks n Regards

Hello,

What version of AWX are you using? You can find this information via the UI (in the upper right corner there’s an “i” inside of a circle; click on that) or at the /api/v2/config/ endpoint (search for “version”). The latest version has additional error messaging on failed email notification tests that give a bit more detail (specifically when you TEST a notification) on why a notification might be failing. Also, to double-check, do you have port 25 open? Sometimes SMTP defaults to 465, 587 or 2525.

Regards,
Bianca

Hi ,

This is the output -

[root@awxuser ~]# netstat -tuplen | grep 25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 0 34450 1407/master
tcp 0 0 172.30.64.201:25 0.0.0.0:* LISTEN 0 34449 1407/master
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 0 34255 1145/cupsd
tcp6 0 0 ::1:25 :::* LISTEN 0 34451 1407/master
tcp6 0 0 ::1:631 :::* LISTEN 0 34254 1145/cupsd
[root@awxuser ~]# iptables -nL | grep 25
ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 ctstate NEW
[root@awxuser ~]# nmap -p25 localhost
bash: nmap: command not found…
[root@awxuser ~]# netstat -plnt | grep ‘:25’
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1407/master
tcp 0 0 172.30.64.201:25 0.0.0.0:* LISTEN 1407/master
tcp6 0 0 ::1:25 :::* LISTEN 1407/master
[root@awxuser ~]# lsof -i:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 1407 root 13u IPv4 34449 0t0 TCP awxuser.example.com:smtp (LISTEN)
master 1407 root 14u IPv4 34450 0t0 TCP localhost:smtp (LISTEN)
master 1407 root 15u IPv6 34451 0t0 TCP localhost:smtp (LISTEN)

Also versions in use -

AWX 2.1.2.0
Ansible 2.7.4

Hi RC,

Have you confirmed that postfix is definitely working outside of AWX? Barring postfix having an issue, I would recommend upgrading to the latest version of AWX and see if you can trigger a more detailed error message from the UI by running an email notification test.