[OJS3.2.1.1] Mail-Spam-Problem

Hello @ctgraham @asmecher,

we are facing the following problems with emails:
Emails sent through OJS are blocked by the spam filter, because the sending server uses the same domain as the reciever. Our IT deparment says »Ideally the mail Header->From doesn’t use our own domain, because this is classically classified as spam«.

Since I’m no pro with mail servers and configurations on this topic: What could I change on our OJS configuration, that the mails make it through the spam filters?

Thanks,
Tobias

See the following settings in config.inc.php:

You will want to set allow_envelope_sender, force_default_envelope_sender, and force_dmarc_compliant_from to be “On”, and you will want to set default_envelope_sender to be an email address trusted by whatever you are using for your mailserver (localhost, if smtp is “Off”, or the smtp_server if smtp is “On”).

Your mailserver must publish an SPF record which matches the domain of the default_envelope_sender. The easiest way to accomplish this is to either:

  • Ask your IT department to include the mailserver in the current SPF record.
  • Use SMTP to connect to a mailserver which is already in your IT department’s SPF allowed list.

@ctgraham Thanks for your advice. I changed the mentioned settings:

allow_envelope_sender = On
default_envelope_sender = localhost
force_default_envelope_sender = On
force_dmarc_compliant_from = On

But now, no email is generated at all – I get the notification: “There was a problem sending an email message. Please try again later, or contact your system administrator.”

Thanks for your help!
Tobias

I figured out, that default_envelope_sender = localhost was the problem. If I change localhost to a valid email adress, emails are generated.

Okay, I’ll now test the behaviour of the spam filter on this and report.

Thanks,
Tobias

1 Like

@ctgraham Thank you very much – everything works fine now!

To sum it up: Changing the following entries in config.inc.php

allow_envelope_sender = On
default_envelope_sender = mail-to@adress.com
force_default_envelope_sender = On
force_dmarc_compliant_from = On

has done the job!

Tobias

Just want to share. Sometimes, your email will be blocked or unsuccessfully sent because it’s not allowed by SPF, or violated DMARC. It’s because your IP hosting is used along with spam email.
The solution is better to use third-party email hosting that supports smtp.
mxroute or mail.baby are reliable, good and cheap. I personally use mxroute.

Thank you

Hi, may I ask how would one fill in the = mail-to@adress.com part? I tried multiple ways of filling that part in using my email account however it did not work. Thank you in advance