Unable to apply AppArmor policy

Created:

2017-08-03 18:58:21 UTC

Modified:

2017-08-08 13:09:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to apply AppArmor policy

Symptoms

Executing the following command to (re-)apply AppArmor policy, the error appears:

# apparmor_parser -r -T -W /etc/apparmor.d/usr.lib.dovecot.dovecot-lda
AppArmor parser error for /etc/apparmor.d/usr.lib.dovecot.dovecot-lda in /etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda at line 7: syntax error, unexpected TOK_ID, expecting TOK_MODE

Cause

Misconfiguration of /etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda file.

Resolution

Make sure /etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda file has content like below:

# cat /etc/apparmor.d/local/usr.lib.dovecot.dovecot-lda
# Site-specific additions and overrides for usr.lib.dovecot.dovecot-lda.
# For more details, please see /etc/apparmor.d/local/README.
/etc/postfix/master.cf r,
/run/dovecot/auth-userdb rw,
/var/qmail/mailnames/** rwkl,

Additional information

Unable to receive e-mails with Dovecot: Error: userdb lookup: connect(/var/run/dovecot/auth-userdb) failed: Permission denied

Have more questions? Submit a request
Please sign in to leave a comment.