Re: sendmail and SELinux

Matthew Black <[email protected]> Fri, 24 Jun 2016 14:25:36 +0000
Newsgroups gmane.mail.cgatepro.general
Message-ID <[email protected]>
I ran into a very similar problem on our web servers but wanted to keep SELinux set to enforcing mode. This Red Hat link provides a solution. You need a Red Hat portal account to read it.

Writing a Custom SELinux Policy
https://access.redhat.com/solutions/117583

In a nutshell, these commands will help (substitute “sendmail” for [application]:

grep [application] /var/log/audit/audit.log | audit2allow -R -M my[application]


semodule -i my[application].pp

matthew
california state university, long beach



From: CommuniGate Pro Discussions [mailto:[email protected]] On Behalf Of Chris Vlad
Sent: Thursday, June 16, 2016 7:19 AM
To: CommuniGate Pro Discussions
Subject: sendmail and SELinux

Hello Support,
I ran CGP on the same box centos 7 with a php application and when SELinux is enabled I can’t send emails from php through sendmail replacement from CGP.
The config in php.ini is fine and the appropriate link has been created in /usr/sbin/sendmail=> /opt/CommuniGate/sendmail, the context of the /opt/CommuniGate/sendmail is “sendmail_exec_t” just like the original application sendmail.postfix . I think it maybe another SELinux context I am missing , probably related to the new path where sendmail is now.
If anyone can point me in the right direction, I really appreciate it.