[Discuss] send email from script as non-root

Rich Pieri richard.pieri at gmail.com
Sat Jan 23 18:15:49 EST 2021


On Sat, 23 Jan 2021 16:39:08 -0500
David Kramer <david at thekramers.net> wrote:

> send-mail: fatal: open /etc/postfix/main.cf: Permission denied
> Can't send mail: sendmail process failed with error code 75

> If I make /etc/postfix o+rx  and make main.cf readable, it just fails
> on some other file in that directory, and I feel this path is going
> in an unsafe direction, so I made /etc/postfix 750 again.

You were on the right track. /etc/postfix needs to be root:root mode
755. All files in this directory need to be readable by the postfix
user. Depending on your distribution, files need to be either root:root
mode 644 or root:postfix mode 640.

-- 
Rich Pieri


More information about the Discuss mailing list