I'm trying to configure a mailserver, but when i run:
echo "test email" | mail -s "test" [email protected] -aFrom [email protected]
and check tail /var/log/mail.err
I get Aug 8 13:36:37 localhost postfix/sendmail[7034]: fatal: open /etc/postfix/main.cf: Permission denied
.
Here are /etc/postfix
folder permissions:
root@localhost:~# ls -la /etc/postfix/
total 156
drwxr-x--- 5 root vmail 4096 Aug 8 13:09 .
drwxr-xr-x 112 root root 4096 Aug 8 13:33 ..
-rwxr-xr-x 1 root vmail 100 Aug 8 11:38 dynamicmaps.cf
drwxr-xr-x 2 root vmail 4096 Jun 19 2020 dynamicmaps.cf.d
-rwxr-xr-x 1 root vmail 3126 Aug 8 13:09 main.cf
-rwxr-xr-x 1 root vmail 1390 Aug 7 15:58 main.cf.orig
-rwxr-xr-x 1 root vmail 27120 Aug 7 15:24 main.cf.proto
lrwxrwxrwx 1 root root 31 Aug 7 15:25 makedefs.out -> /usr/share/postfix/makedefs.out
-rwxr-xr-x 1 root vmail 6511 Aug 8 12:27 master.cf
-rwxr-xr-x 1 root vmail 6208 Aug 7 16:17 master.cf.orig
-rwxr-xr-x 1 root vmail 6208 Aug 7 15:24 master.cf.proto
-rwxr-xr-x 1 root vmail 148 Aug 7 16:13 mysql-virtual-alias-maps.cf
-rwxr-xr-x 1 root vmail 139 Aug 7 16:12 mysql-virtual-email2email.cf
-rwxr-xr-x 1 root vmail 137 Aug 7 23:53 mysql-virtual-mailbox-domains.cf
-rwxr-xr-x 1 root vmail 135 Aug 7 16:13 mysql-virtual-mailbox-maps.cf
-rwxr-xr-x 1 root vmail 10268 Jun 19 2020 postfix-files
drwxr-xr-x 2 root vmail 4096 Aug 8 11:38 postfix-files.d
-rwxr-xr-x 1 root vmail 11532 Jun 19 2020 postfix-script
-rwxr-xr-x 1 root vmail 29872 Jun 19 2020 post-install
drwxr-xr-x 2 root vmail 4096 Jun 19 2020 sasl
I am sorry if my question is badly formatted but i am new here.
I will update if it helps you.