Debian 12 (Proxmox Mail Gateway) and starting mailCow mail service
Hello.
If You have a problem with starting the MailCow mail service on the Debian 12 (Proxmox Mail Gateway iso) You can use this article.
1. Need to check what template to use Apparmor
apparmor module is loaded.
10 profiles are loaded.
9 profiles are in enforce mode.
docker-default
/usr/bin/freshclam
/usr/lib/NetworkManager/nm-dhcp-client.action
/usr/lib/NetworkManager/nm-dhcp-helper
/usr/lib/connman/scripts/dhclient-script
/usr/sbin/clamd
/{,usr/}sbin/dhclient
lsb_release
nvidia_modprobe
nvidia_modprobe//kmod
0 profiles are in complain mode
0 profiles are in kill mode.
0 profiles are in unconfined mode.
108 processes have profiles defined.
1 processes are in enforce mode.
2. Create apparmor template in /etc/apparmor.d/docker-default
#include <tunables/global>
profile docker-default flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
ptrace peer=@{profile_name},
network,
capability,
file,
umount,
deny @{PROC}/* w, # deny write for all files directly in /proc (not in a subdir)
# deny write to files not in /proc/<number>/** or /proc/sys/**
deny @{PROC}/{[^1-9],[^1-9][^0-9],[^1-9s][^0-9y][^0-9s],[^1-9][^0-9][^0-9][^0-9]*}/** w,
deny @{PROC}/sys/[^k]** w, # deny /proc/sys except /proc/sys/k* (effectively /proc/sys/kernel)
deny @{PROC}/sys/kernel/{?,??,[^s][^h][^m]**} w, # deny everything except shm* in /proc/sys/kernel/
deny @{PROC}/sysrq-trigger rwklx,
deny @{PROC}/kcore rwklx,
deny @{PROC}/mem rwklx,
deny @{PROC}/kmem rwklx,
deny mount,
deny /sys/[^f]*/** wklx,
deny /sys/f[^s]*/** wklx,
deny /sys/fs/[^c]*/** wklx,
deny /sys/fs/c[^g]*/** wklx,
deny /sys/fs/cg[^r]*/** wklx,
deny /sys/firmware/** rwklx,
deny /sys/kernel/security/** rwklx,
}
3. Then change mode from enforce to complaine
aa-complain /etc/apparmor.d/docker-default
After that problem must be gone.
Bye.
Comments
Post a Comment