Cannot send email message after a submission

I am using OJS 3.1.2-1 under Ubuntu 18.04 bionic with postfix. I’ve tested postfix and it works perfectly. However, when I do a submission, the OJS server notices me that there was a problem sending an email message. I checked the terminal and it shows me

Invalid address: (From): root@localhost.

What’s more , I checked the php mail log and there are no error information. After that I’ve tried to switch force_dmarc_compliant_from, force_default_envelope_sender and allow_envelope_sender to “On” and uncomment. But it doesn’t work.

How can I fix it?

I added -f after sendmail_apth php under mail setting, right now, the mail system looks works, but user can still see that notification after a submission.

With the configuration variables allow_envelope_sender, force_default_envelope_sender, and force_dmarc_compliant_from all “On”, OJS will use the value of default_envelope_sender as the “From” address. Does that value in currently have a good email address?

1 Like

I was setting default_envelope_sender be my postfix default sender email address. After I change default_envelope_sender to a gmail. it works. How can I use a custom email address, such as “” be sender? When I use mail <target_email_address>, my computer was using it be sender and a target email can receive the email. And again, thank you for your tip.

OJS formulates the From, To, and Reply-To headers and then passes those off to either the PHP mail() function (if smtp is “Off” in or to your specified smtp server (if smtp is “On” in

In the case of PHP’s mail() function, your PHP settings (and, likely, local mailserver configuration) dictate the mail sending rules (such as allowing or disallowing specific senders).

In the case of SMTP, your SMTP server dictates these same rules.

From your description, it sounds like you are using PHP to route mail to a local postfix server, but the postfix service is returning a warning of “Invalid address: (From):”.

We can help configure the OJS settings, but if postfix is the one rejecting the address, this will need to be corrected within that component.

If you can share your settings and your PHP error log in detail, we may be able offer additional pointers, but this sounds more like a mailserver issue than an OJS issue.

Thank you. After I changed the default_envelope_sender to original one, it works right now. but I am confused about it. Thank you for your help again.