View Single Post
  #1 (permalink)  
Old 01-Oct-2006, 23:09
Jim Pye
Guest
 
Posts: n/a
Default Watchout for AppArmor when configuring services

People

Just a note on some findings I have struck over the last few weeks.

Configuring a virus scanner and spam checking software to run with the
PostFix server on SuSE 10.1.

Got it all configured but was getting an error in the /var/log/mail file:

postfix/qmgr[7632]: warning: connect to transport filter: Operation not
permitted

I had seen this error earlier and tracked it down to AppArmor.

To see if AppArmor is the culprit tail the /var/log/audit/audit.log file
while trying to perform the operation that is failing. You will see
something like:

type=APPARMOR msg=audit(1159755381.613:10): REJECTING w access
to /var/spool/postfix/private/filter (qmgr(7632)
profile /usr/lib/postfix/qmgr active /usr/lib/postfix/qmgr)

As PostFix is one of the services that is configured by default to be
controlled by AppArmor, the AppArmor profile is not allowing the qmgr
process within PostFix to write to the filter file (actually a socket which
has been created for the connection to the filter software). The PostFix
profile needs a little modification to make it run successfully.

In Yast open the AppArmor controls and select the Edit Profile option.

From the profile names select the /usr/lib/postfix/qmgr -> next

Select the Add Entry and add a file.

Browse to and select the /var/spool/postfix/private/filter and give the w
permission.

Once this has been done AppArmor rereads the profiles and now the
application should work. Note that for another application I had to do this
multiple times as once I cleared one issue another would appear. So keep
monitoring the audit.log, and modifying the profiles, until the application
is running properly.

Cheers
Jim

--
Pye, James Pye, chmod 007
The Ultimate Open Source