Setting of central mail address for Editors/Reviewers email notification

Dear colleagues,

We have problem with sending mail from reviewers. If sender has mail-address with another domain than our university, his letter doesn’t delivery.
That problem described in this FAQ section and this topic, but we don’t understand next places in solution:

  1. Where is can enable field “Reply-To”? In our system this field doesn’t exist, and field “From” not available for editing.
  2. In mail-sending process field “from” include user’s e-mail, although in 1.2 Principal Contact hold correct general mail. OJS vers. 2.4.8, and mail’s domain equal domain of mail-server (@ssau.ru).
  3. We tried to use SMTP-setting in config.inc.php with our mail-server setting, but this step too failed.

Please, explain this situation, maybe we missed some important step.

Regards,
Sergey Morenov,
Samara University

Hi @smorenov,

Are you using OJS 2.4.8, or 2.4.8-1?

Regards,
Alec Smecher
Public Knowledge Project Team

This sounds very much like an issue with SPF and/or DKIM for your domain. I try to explain some of the technical details here:

2.4.8-1, installed 8.08.16. But I don’t upgrade datebase, which transfer from old system 2.4.5 and imported on clear OJS-2.4.8-1.

Hi @smorenov,

I’m not sure failing to upgrade the database would cause emails not to be sent/received – see @ctgraham’s post about that – but is there a reason you haven’t run the database upgrade process? It’s likely to cause problems if you don’t.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, @asmecher,

I upgrade database to 2.4.8-1, but email sent don’t work, with SMTP-settings in config.inc.php, and without them.

Principal contact field having adress with domain @ssau.ru, equals our SMTP-server.

I attached this logs, maybe it getting some information:

Formed server: mb.ssau.ru
more_gris@mail.ru
mxs.mail.ru
Remote Server returned ‘554 5.7.1 <mxs.mail.ru #5.7.1 smtp; 550 5.7.1 This message was not accepted due to domain owner DMARC policy (RFC 7489) https://help.mail.ru/mail-help/postmaster/dmarc>’

MAIL-LOG with SMTP-setting

Received: from mailfilter.ssau.ru (mailfilter.ssau.ru [91.222.128.20])
by mb.ssau.ru (Postfix) with ESMTP id 84E79448073
for more_gris@mail.ru; Tue, 27 Dec 2016 15:01:04 +0400 (SAMT)
Received: from jbpe.ssau.ru (hosting.ssau.ru [91.222.128.11])
by mb.ssau.ru (Postfix) with ESMTP id 782D8448072
for more_gris@mail.ru; Tue, 27 Dec 2016 15:01:04 +0400 (SAMT)
To: admin admin more_gris@mail.ru
Subject: [JBPE] Editor Decision
Content-Type: text/plain; charset=“utf-8”
X-Mailer: Public Knowledge Project Suite v2
X-Originating-IP: 91.222.128.24
Date: Tue, 27 Dec 2016 15:01:01 +0400
From: admin admin more_gris@mail.ru
Message-ID: 20161227110104.782D8448072@mb.ssau.ru
X-KLMS-Rule-ID: 3
X-KLMS-Message-Action: skipped
X-KLMS-AntiSpam-Status: not scanned, whitelist
X-KLMS-AntiPhishing: not scanned, whitelist
X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, not scanned, whitelist
MIME-Version: 1.0

MAIL-LOG without SMTP-setting

Received: from mailfilter.ssau.ru (mailfilter.ssau.ru [91.222.128.20])
by mb.ssau.ru (Postfix) with ESMTP id CD6FB1160B4
for more_gris@mail.ru; Tue, 27 Dec 2016 15:02:54 +0400 (SAMT)
Received: from hosting.ssau.ru (hosting.ssau.ru [91.222.128.11])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by mb.ssau.ru (Postfix) with ESMTP id BC4F41160B2
for more_gris@mail.ru; Tue, 27 Dec 2016 15:02:54 +0400 (SAMT)
Received: from hosting.ssau.ru (localhost [127.0.0.1])
by hosting.ssau.ru (8.14.7/8.14.7) with ESMTP id uBRB2pN6023201
for more_gris@mail.ru; Tue, 27 Dec 2016 15:02:51 +0400
Received: (from jbpe@localhost)
by hosting.ssau.ru (8.14.7/8.14.7/Submit) id uBRB2pRI023200;
Tue, 27 Dec 2016 15:02:51 +0400
Message-ID: 201612271102.uBRB2pRI023200@hosting.ssau.ru
X-Authentication-Warning: hosting.ssau.ru: jbpe set sender to morenov.sv@ssau.ru using -f
To: admin admin more_gris@mail.ru
Subject: [JBPE] Editor Decision
X-PHP-Originating-Script: 1003:String.inc.php
Content-Type: text/plain; charset=“utf-8”
X-Mailer: Public Knowledge Project Suite v2
X-Originating-IP: 91.222.128.24
Date: Tue, 27 Dec 2016 15:02:51 +0400
From: admin admin more_gris@mail.ru
X-KLMS-Rule-ID: 3
X-KLMS-Message-Action: skipped
X-KLMS-AntiSpam-Status: not scanned, whitelist
X-KLMS-AntiPhishing: not scanned, whitelist
X-KLMS-AntiVirus: Kaspersky Security 8.0 for Linux Mail Server, version 8.0.1.721, not scanned, whitelist
MIME-Version: 1.0

And actual setting of mailing in config.inc is there:

[email]

; Use SMTP for sending mail instead of mail()
; smtp = Off

; SMTP server settings
; smtp_server = mb.ssau.ru
; smtp_port = 25

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide noreply address
; The reply-to field will be set with the reply-to or from address.
force_default_envelope_sender = On

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
; smtp_auth = PLAIN
; smtp_username = morenov.sv
; smtp_password = password

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
; allow_envelope_sender = Off

; Default envelope sender to use if none is specified elsewhere
default_envelope_sender = morenov.sv@ssau.ru

; Enable attachments in the various “Send Email” pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On

; Amount of time required between attempts to send non-editorial emails
; in seconds. This can be used to help prevent email relaying via OJS.
time_between_emails = 3600

; Maximum number of recipients that can be included in a single email
; (either as To:, Cc:, or Bcc: addresses) for a non-priveleged user
max_recipients = 10

; If enabled, email addresses must be validated before login is possible.
require_validation = Off

; Maximum number of days before an unvalidated account expires and is deleted
validation_timeout = 14

Regards,
Sergey Morenov,
Samara University

Hi @smorenov,

Your SMTP settings appear to be commented out in config.inc.php, and the smtp setting is set to Off. Are you sure that’s what you intend?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi, @asmecher,

Sorry, I made a mistake in statement - actual setting is it:

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = mb.ssau.ru
smtp_port = 25

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide noreply address
; The reply-to field will be set with the reply-to or from address.
force_default_envelope_sender = On

; Enable SMTP authentication
; Supported mechanisms: PLAIN, LOGIN, CRAM-MD5, and DIGEST-MD5
smtp_auth = PLAIN
smtp_username = “morenov.sv”
smtp_password = “****”

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
allow_envelope_sender = On

; Default envelope sender to use if none is specified elsewhere
default_envelope_sender = morenov.sv@ssau.ru

; Enable attachments in the various “Send Email” pages.
; (Disabling here will not disable attachments on features that
; require them, e.g. attachment-based reviews)
enable_attachments = On

But it is not work too. I was trying Gmail’s SMTP-service, and it work, but field ‘from’ include gmail-adress from SMTP-setting. I found your solution in patch, but I don’t understand, why install this patch in OJS. Tell me please, it can do automatic, or by hand?

Regards,
Sergey Morenov,
Samara University

Hi @smorenov,

The patch isn’t relevant any more, I don’t think. I suspect the most relevant indicator you’re getting so far is the DMARC error from your logs. @ctgraham knows the most of any of us on the subject – Clinton, do you have anything to suggest?

Thanks,
Alec Smecher
Public Knowledge Project Team

Hi again, @asmecher,

We tested sending mails on clear-installed 2.4.8-1 version, but mail too not delivered, if sender-adress is not same-domain with system, and sender-adress != destination-adress.
In case google-smtp, mail delivered with google-adress, but not with sender-adress. How is work with mails?

And I detected next: as principal contact using administration site principal contact, but not journal’s principal contact.

Upd: can this patch helping in my situation with google-smtp?

Hi @smorenov,

OJS doesn’t do anything particularly sophisticated with emails before it sends them – it will be your mail server, not OJS, that distinguishes between delivered and undelivered messages.

The gmail SMTP service will change the sender – it’s the mail server, not OJS, doing that.

I would suggest testing a few messages e.g. using PHPMailer to determine whether your server is blocking messages based on the sender’s domain.

Regards,
Alec Smecher
Public Knowledge Project Team

The usefulness of the patch in pkp/pkp-lib#1723: force_default_envelope_sender moves the traditional from to a reply-to for DMARC compliance by ctgraham · Pull Request #1724 · pkp/pkp-lib · GitHub will depend largely on what exactly is preventing the mail delivery. @asmecher’s suggestion is a good start for seeing if other mail sent natively from the server gets delivered.

There are several considerations in validating email, including SPF, DMARC, and DKIM. The relationships of these standards to OJS is discussed a bit here:

The best way to troubleshoot email problems is digging into the SMTP logs (which you may not have easy access to) and the SMTP headers (which are hidden within every email you receive). On testing solution I’ve used in the past is to email something to a mailinator.com address, which is very permissive for receiving messages and which allows you to see the SMTP headers for the message. Within these headers, look for failure messages for SPF and/or DMARC, and look for a valid DKIM signature.

1 Like

Thanks for answer, @ctgraham, mailinator.com is interesting service.
It revealed that field “Reply-to” doesn’t exist in SMTP-headers of our mails. Is it wrong, if we have next settings?

; Force the default envelope sender (if present)
; This is useful if setting up a site-wide noreply address
; The reply-to field will be set with the reply-to or from address.
force_default_envelope_sender = On

; Allow envelope sender to be specified
; (may not be possible with some server configurations)
allow_envelope_sender = On

; Default envelope sender to use if none is specified elsewhere
default_envelope_sender = morenov.sv@ssau.ru

If you are using OJS 2.4.8-1, this is expected. The fix for SPF fixes should be reverted and altered · Issue #1433 · pkp/pkp-lib · GitHub largely removed most Reply-To usage. The fix for Add reply-tos back in for DMARC compatibilty · Issue #1723 · pkp/pkp-lib · GitHub adds them back in for your specific configuration. What do the SMTP headers for the receive email say about DMARC and SPF?

Hello again!
We are still sitting with our mail’s-problem. I’m confused in history of this problem fixes, and I have a few questions:

  1. In case using Gmail-SMTP, my gmail-adress from smtp-setting are filling as “From”-address for all letters. It’s so uncomfortably, how to solve this problem now?
  2. In case using our smtp-server with 2.4.8-1 ojs-version, with our domain-email-address as site&journal principal contacts, but with gmail/another email-address as sender private email, it’s not work. Why isn’t work on clear 2.4.8-1 system with previously written settings?

I believe (based on other user reports) that Gmail will rewrite the From address to the authenticated Gmail user’s address no matter what SMTP headers are provided. This is by design. Not all email services will do this, but Gmail ensures that the From address matches whatever SMTP user (as set in config.inc.php) connected to Gmail. This is a function of Gmail and cannot be overridden by OJS.