Quote:
Originally Posted by thomasz
Hi!
|
Hello and welcome to LQ. Hope you like it here.
If you don't mind me asking, how did you find LQ?
Quote:
Originally Posted by thomasz
I have setup the processing rules to ~/.procmailrc for the user:
|
This is an unprivileged user (with ID >= 500), right?
Quote:
Originally Posted by thomasz
I have tried executing the script /usr/sbin/rt-mailgate directly and by using a symbolic link /etc/smrsh/rt-mailgate. They both fail.
|
/etc/smrsh/ is the location for Sendmail *itself* to execute things from, not for ordinary users to use. You say both commands fail. You mean running those as unprivileged user? Any errors displayed that could point to configuration issues or not using the right arguments?
Quote:
Originally Posted by thomasz
# ls -la /usr/sbin/rt-mailgate
|
If you run SELinux and suspect problems with that, add "-Z" to see the security context. This also works with other utilities like 'ps'.
Quote:
Originally Posted by thomasz
The obvious solution that multiple guides mention is to disable SELinux
|
No the obvious
misconception is to disable it. Most guides will tell you to disable SELinux because they want to move on to the next step, not explaining the security benefits of SELinux and the consequences of disabling it. SELinux "targeted" policy and tools now are capable of much more, so adjusting it should be no problem.
Quote:
Originally Posted by thomasz
Another solution is to use /etc/aliases, but then I would have to maintain that file everytime a new ticket queue is added to RT.
|
Even that could be automated, but let's leave that as a last resort option.
Quote:
Originally Posted by thomasz
Any idea how I can allow procmail and the user to execute the script without disabling SELinux?
|
If I "translate" your AVC messages to something more readable I get:
Code:
avc: process name="rt-mailgate" (running in scontext=user_u:system_r:procmail_t:s0) is not allowed to { execute } exe="/usr/bin/procmail" (which runs in tcontext=system_u:object_r:sbin_t:s0)
avc: process name="rt-mailgate" (running in scontext=user_u:system_r:procmail_t:s0) is not allowed to { read } exe="/bin/bash" (which runs in tcontext=system_u:object_r:sbin_t:s0)
If I would translate that into a local policy addition the rule could look like:
Code:
allow procmail_t sbin_t:file { read execute };
...but that isn't complete and possibly not too restrictive.
Luckily for you there's a *way easier* approach to solving AVC problems and that's running "audit2allow", my most recent commandset is here:
http://www.linuxquestions.org/questi...78#post3073278