Force emails to be sent via system account

Describe the issue or problem
Emails are sent using the admin email via ojs domain :

  • Go to settings > users & roles

  • Pick one user and send an email to him

Instead of having sent from “noreply@domain.com”, the email is flagged as spam by google and in the header “from admin_email via domain.com

Steps I took leading up to the issue
config :

[email]

default = smtp

sendmail_path = “/usr/sbin/sendmail -bs”

smtp = On

smtp_server = “domain.com”smtp_port = 587

smtp_auth = tls

smtp_username = ojs

smtp_password = longpassword

; smtp_suppress_cert_check = On

allow_envelope_sender = Off

default_envelope_sender = “noreply@domain.com”

force_default_envelope_sender = On

In admin/systemInfo :

email
default smtp
sendmail_path /usr/sbin/sendmail -bs
smtp 1
smtp_server domain.com
smtp_port 587
smtp_auth tls
smtp_username **************
smtp_password **************
allow_envelope_sender
default_envelope_sender noreply@domain.com
force_default_envelope_sender 1
force_dmarc_compliant_from 1
require_validation 1
validation_timeout 14

What application are you using?
For example, OJS 3.5.0.1

Additional information

Other system emails are sent correctly.

My postfix config doesn’t allow sender mismatch.

PHP8.4, Nginx 1.22.1