Bounce address field in OJS 3.1.2 disabled

Hello,

I have “allow_envelope_sender” turned on in config.inc.php but “Bounce address” field is still disabled in OJS. How can i enable this? Thx.

Regards.

hi @orcalator

Are the other OJS envelope fields enabled and filled in? There is also default_envelope_sender and force_default_envelope_sender, and now also force_dmarc_compliant_from and dmarc_compliant_from_displayname.

Cheers,

Hello @jnugent,

Only dmarc_compliant_from_displayname is disabled, all other settings are enabled.

EDIT:

I enabled all fields now but nothing has changed. Bounce address field is still grayed out.

Regards.

Can you paste a screenshot of the form?

Thanks!

Sure @jnugent,

ojs-bounce

Regards.

I can’t duplicate it here. If I remove the semi-colon in front of allow_envelope_sender and change the value to On (also important), my installation works correctly.

Hi @jnugent,

Hm, i made some debugging and found this:

In file: lib/pkp/controllers/tab/settings/emailTemplates/form/EmailTemplatesForm.inc.php

Line:

‘envelopeSenderDisabled’ => !Config::getVar(‘email’, ‘allow_envelope_sender’) || Config::getVar(‘email’, ‘force_default_envelope_sender’) && Config::getVar(‘email’, ‘default_envelope_sender’),

is causing trouble. If i change that to:

‘envelopeSenderDisabled’ => !Config::getVar(‘email’, ‘allow_envelope_sender’) || !Config::getVar(‘email’, ‘force_default_envelope_sender’) && !Config::getVar(‘email’, ‘default_envelope_sender’),

then it works. Are you sure this is not a bug?

Regards.

Hey @orcalator

No, that’s not a bug. That bit of code has been around since the early days of OJS and we use it everywhere. Can you post a small snippet of your configuration file with the email settings, being careful to not include any passwords or sensitive information? You can PM it to me if you like.

What you’ve essentially done is modify the code so the bounce field is enabled only if they are turned off in your own configuration.

Cheers,
Jason

@jnugent,

Hm, but variable is called envelopeSenderDisabled, not envelopeSenderEnabled so i suppose if u want to display Bounce field this variable should have a value set to FALSE. So if:

allow_envelope_sender = true;
force_default_envelope_sender = true;
default_envelope_sender = true;

that line would resolve to:

envelopeSenderDisabled = !true || true && true

so in the end this results in envelopeSenderDisabled = TRUE

Do i do something wrong here?

Regards.

If force_default_envelope_sender is set to “On” in your config file, then you can’t set it on the form because, essentially, the config file is going to force OJS to use the default envelope sender specified by default_envelope_sender. So, if you want to enable the form field, you need to have allow_envelope_sender set to On, and at least force_default_envelope_sender set to Off.

The email options in the config file are a bit confusing, even to me. :slight_smile:
Cheers,
Jason

1 Like

@jnugent,

So you suggest me to set force_default_envelope_sender to off. But if i do that then DMARC option will not work? In DMARC section it says:

“To use this you must set force_default_enveloper_sender = On and default_envelope_sender must be set to a valid address in a domain you own.”

Regards.

you can still use DMARC - just set the default bounce reply to address in your config file with default_envelope_sender :slight_smile:

Hello,

I have “allow_envelope_sender” turned on in config.inc.php but “Bounce address” field is still disabled in OJS. How can I enable this? Thanks

Regards.
Capture