I use php mail function to send emails on different RHEL server without a problem.
When I try to use the same script on RHEL server with selinux enabled I get following error.
(reason: 550 5.7.1 Unable to relay for firstname.lastname@example.org)
Sendmail is working on this server, internal emails are getting sent to root and user1 etc. They just don't make it to the regular email addresses.
With semanage I see:
smtp_port_t tcp 25
with iptables I see:
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp spt:smtp