I'm on Debian 8 and not sure what I have done as whenever I try and send an email using Roundcube it says there was an error sending the message, so I checked the logs and found:
postfix/sendmail[22146]: fatal: open /etc/postfix/main.cf: Permission denied
Everything was working a couple of days ago and I have not changed anything since, not even installed updates.
So I tried:
sudo chown root:root /etc/postfix/main.cf
sudo chmod 0644 /etc/postfix/main.cf
Still no luck after restarting both Postfix and Dovecot :(
When using ls
to view permissions:
-rw-r--r-- 1 root root 2363 Jun 3 23:32 /etc/postfix/main.cf
What do I do?
UPDATE:
Here are my permissions for /etc/postfix
drwxr-x--- 3 root root 4096 May 30 19:44 .
drwxr-xr-x 101 root root 4096 Jun 4 00:58 ..
-rw-r----- 1 root root 329 May 30 18:08 dynamicmaps.cf
-rw-r--r-- 1 root root 2367 Jun 4 00:40 main.cf
-rw-r----- 1 root root 6046 Jun 1 13:39 master.cf
-rw-r----- 1 root root 149 May 30 19:43 mysql-virtual-alias-maps.cf
-rw-r----- 1 root root 143 May 30 19:44 mysql-virtual-email2email.cf
-rw-r----- 1 root root 139 May 30 19:45 mysql-virtual-mailbox-domains.cf
-rw-r----- 1 root root 139 May 30 19:52 mysql-virtual-mailbox-maps.cf
-rwxr-x--- 1 root root 28047 Apr 29 17:01 post-install
-rw-r----- 1 root root 20281 Apr 29 17:01 postfix-files
-rwxr-x--- 1 root root 8861 Apr 29 17:01 postfix-script
drwxr-x--- 2 root root 4096 Apr 29 17:01 sasl
I found POSTFIX main.cf permission denied and tried everything there and nothing worked for my setup.
Also by running sudo service postfix status
is shows that postfix is loaded from /etc/init.d/postfix
but there is no directory located there? Is this normal and should it not be loaded from /etc/postfix
?