[Discuss] send email from script as non-root
David Kramer
david at thekramers.net
Sat Jan 23 19:49:57 EST 2021
OK it didn't seem safe to me to have files in /etc/postfix to be world
readable, but if that's how it's supposed to be, I will do that.
Thanks.
On 1/23/21 6:15 PM, Rich Pieri wrote:
> 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.
>
More information about the Discuss
mailing list