Make WordPress Core

Opened 4 years ago

Closed 7 months ago

Last modified 7 months ago

#56115 closed defect (bug) (wontfix)

Prevent default from email to use a subdomain when the siteurl is a subdomain

Reported by: benoitchantre's profile benoitchantre Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.1
Component: Mail Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by sabernhardt)

When the site url uses a top-level domain or the www subdomain, the default from email is wordpress@mydomain.com

When the site url uses a sub-domain (not www), then the default from email is wordpress@mysubdomain.mydomain.com. In this case, the email will be tagged as spam because the from header domain doesn't the top-level domain.

Would it be possible de force (rewrite) the siteurl variable to remove the subdomain, in order to reduce the chance to have emails marked as spam?

Related: #5007

Change History (3)

#1 @sabernhardt
4 years ago

  • Component changed from General to Mail
  • Description modified (diff)

#2 follow-up: @SirLouen
7 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

In this case, the email will be tagged as spam because the from header domain doesn't the top-level domain.

This is not correct. Subdomains carry the same reputation as the parent domain.

The fact that the email is ending in the spam box is completely unrelated to the use of a subdomain. The important thing here is how your MTA is configured, not which subdomain is being used in WP. Probably you have configured your MTA with your domain and this is why your emails are not fully compliant spam-wise (being the `From` is different to the `Received` hostname)

Using the subdomain for the email, when the site is using a subdomain, is just a matter of consistency and what a user should expect by default.

Be aware, that many users could be using a subdomain without access to the domain for several reasons beyond their control. The fact that you just happen to have access to both domain and subdomain is simply your specific use case but does not generalize well.

If you personally find that the subdomain is not doing any good for the reasons stated above, you can always edit it manually. For example, you can directly hook to wp_mail_from filter and return the email you want to use for those From.

Closing this as wontfix

#3 in reply to: ↑ 2 @desrosj
7 months ago

  • Keywords reporter-feedback added
  • Milestone Awaiting Review deleted

Replying to SirLouen:

In this case, the email will be tagged as spam because the from header domain doesn't the top-level domain.

This is not correct. Subdomains carry the same reputation as the parent domain.

If DNS only authenticates example.com (SPF/DKIM) and the DMARC policy is published on example.com, many receivers will see From = sub.example.com while SPF/DKIM authenticate example.com (or a third-party).

This will (usually) break DMARC alignment, which results in a misaligned message and is frequently quarantined or rejected according to Google/Microsoft guidance.

It's not so much about the reputation of the parent domain, it's more about the configuration, which is out of WordPress' control.

@benoitchantre Could you share more more about your setup and why making an adjustment to your email configuration is not possible to fix the issue? If you feel this should not yet have been closed, please feel free to reopen with more context.

Note: See TracTickets for help on using tickets.