community/apparmor: fix openssl and dovecot profile
(1) /etc/apparmor.d/usr.sbin.dovecot
Alpine packages dovecot differently from other distros such as Arch. Several binaries are placed in /usr/libexec/dovecot/ instead of /usr/lib/dovecot/. Thus, upstream apparmor profile won't work. All executable entries with /usr/lib/dovecot/ should be replaced.
for example, this line in /etc/apparmor.d/usr.sbin.dovecot
/usr/lib/dovecot/auth mrPx,
should become
/usr/libexec/dovecot/auth mrPx,
(2) /etc/apparmor.d/usr.lib.dovecot.*
As mentioned in (1), other profiles confining /usr/libexec/dovecot/* binaries should also be renamed and have their content fixed.
for example,
/etc/apparmor.d/usr.lib.dovecot.anvil
should become
/etc/apparmor.d/usr.libexec.dovecot.anvil
to fix their content:
sed -e 's|/usr/lib/dovecot|/usr/libexec/dovecot|g' -i /etc/apparmor.d/usr.libexec.dovecot.*
(3) /etc/apparmor.d/abstractions/openssl
Alpine ships different openssl versions. So, this profile should also contain openssl 1.1. This line should be added:
/etc/ssl1.1/openssl.cnf r,