amavisd-milter: Permission denied on socket
With the default installation, postfix is not able to access the amavisd-milter socket.
Error message: 2020-06-15T02:16:01.241515+02:00 mailhost mail mail.warning postfix/smtpd[1515]: warning: connect to Milter service unix:/var/amavis/amavisd-milter.sock: Permission denied
In the init file, section 'start_post' the permission is set as follows:
start_post() {
chmod 0770 "$socket_milter"
}
However, the permissions are not getting applied.
WORKAROUND:
We solved the issue by adding an additional sleep command as follows:
start_post() {
# Sleeping 3 seconds before socket-files checking
sleep 3
chmod 0770 "$socket_milter"
}