I am running postfix on an ubuntu 20.04 server. I am trying to fix some warnings in my /var/log/mail.err file I am getting the following:
Aug 9 09:34:45 mail postfix/proxymap[281260]: error: open /etc/postfix/sql/mysql_virtual_domains_maps.cf: Permission denied
Aug 9 09:36:49 mail postfix/proxymap[282230]: error: open /etc/postfix/sql/mysql_virtual_alias_maps.cf: Permission denied
Aug 9 09:36:49 mail postfix/proxymap[282230]: error: open /etc/postfix/sql/mysql_virtual_alias_domain_maps.cf: Permission denied
Aug 9 09:36:49 mail postfix/proxymap[282230]: error: open /etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf: Permission denied
Aug 9 09:36:49 mail postfix/proxymap[282230]: error: open /etc/postfix/sql/mysql_virtual_domains_maps.cf: Permission denied
Aug 9 10:25:49 mail postfix/proxymap[304446]: error: open /etc/postfix/sql/mysql_virtual_alias_maps.cf: Permission denied
Aug 9 10:27:49 mail postfix/proxymap[304446]: error: open /etc/postfix/sql/mysql_virtual_alias_domain_maps.cf: Permission denied
Aug 9 10:27:49 mail postfix/proxymap[304446]: error: open /etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf: Permission denied
Aug 9 10:27:49 mail postfix/proxymap[304446]: error: open /etc/postfix/sql/mysql_virtual_domains_maps.cf: Permission denied
In my /var/log/mail.log file I am getting:
Aug 9 10:53:49 mail postfix/proxymap[304446]: warning: mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf is unavailable. open /etc/postfix/sql/mysql_virtual_alias_maps.cf: Permission denied
Aug 9 10:53:49 mail postfix/cleanup[306706]: warning: proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
Aug 9 10:53:49 mail postfix/cleanup[306706]: warning: 359E0123381: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
Aug 9 10:53:49 mail postfix/pickup[282225]: 36D3B123381: uid=997 from=<netdata>
Aug 9 10:53:49 mail opendmarc[1127]: ignoring connection from localhost
Aug 9 10:53:49 mail postfix/cleanup[306428]: 36D3B123381: message-id=<[email protected]>
Aug 9 10:53:49 mail postfix/proxymap[304446]: warning: mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf is unavailable. open /etc/postfix/sql/mysql_virtual_alias_maps.cf: Permission denied
Aug 9 10:53:49 mail postfix/cleanup[306428]: warning: proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf lookup error for "[email protected]"
Aug 9 10:53:49 mail postfix/cleanup[306428]: warning: 36D3B123381: virtual_alias_maps map lookup problem for [email protected] -- message not accepted, try again later
Here is the output of:
namei -l /etc/postfix/sql/mysql_virtual_domains_maps.cf
f: /etc/postfix/sql/mysql_virtual_domains_maps.cf
drwxr-xr-x root root /
drwxr-xr-x root root etc
drwxr-xr-x root root postfix
drwxr-xr-x root root sql
-rw-r-x--- root root mysql_virtual_domains_maps.cf
What exactly might be the problem here? How can I debug and then fix this?
As expected, your postfix user has no permissions to read the configuration files.
Or, if you don't want other users to read the files
Side note: You don't really need the executable bit for the group here: