There was a problem sending an email message after submission

I am using OJS 3.1.2-1 under Ubuntu 18.04 bionic, and I am using postfix as my email server. I’ve tested postfix and it works perfectly. In addition, when I publish some issues, everyone can get email notification. However, when I do a submission, the OJS server notices me that there was a problem sending an email message.
Then I’ve checked the server and it said

sh: 1: /etc/postfix: Permission denied
Could not instantiate mail function.
Invalid address:  (From): root@localhost

But I’ve already changed the permission by using sudo chmod 777 /etc/postfix.
I’ve checked the log in /var/log/mail.log but there are no error messages.

Can someone help me? I really have no idea about how can I fix it.

Hi @botshawn,

This is more a PHP question than an OJS question, but see e.g. this StackOverflow post. 777 permissions aren’t safe to use in this case, and I suspect you’ve set sendmail_path incorrectly – /etc/postfix is a configuration file, not an executable program.

Alec Smecher
Public Knowledge Project Team

Thanks, I changed sendmail_path to /usr/lib/sendmail -t -i then the problem resloved.