[CentOS] selinux - centos 6.3 - mail

Mon Dec 24 16:24:57 UTC 2012
Gregory P. Ennis <PoMec at PoMec.Net>

Everyone,

I recently had a disc drive failure on a centos 5.8 internal mail
server.  I replaced the drive and installed centos 6.3.   I had selinux
turned off on the 5.8 machine, and with the upgrade to 6.3 decided to
leave selinux active with the hopes I had learned enough to be able to
use it.

I have a couple of perl scripts that are activated by email that prints
the contents of the mail packet on a printer.  I have been able to fix
the temporary directories that are used with changes of selinux
permissions, but I have not been able to make everything work with the
command :

$arg = ("lp -o raw -d $LPT  $MAILFILEO");
system($arg);

I get the following log entry :

Can't exec "lp": Permission denied at /usr/local/bin/s.printer.process
line 190, <FILEI> line 19.

Any ideas how I can get 'lp' to accept usage from the 'mail' user
account?  Everything works ok when selinux is turned off.  I would like
to keep it on at this point.

Thanks,

Greg Ennis