Support » Requests and Feedback » Valid Sender: header in email headers

  • Hi,
    I’m part of a group of friends who are running a server in Redbus. Because we’re kind souls we let people run blogs etc on said server. Some of the aforementioned are running WP.
    When WP notifies the blog author or admin about a comment, certain mail servers reject the email. This is typically when someone’s put in an invalid email address in the comment form, and as such the from line is subsequently invalid also.
    This is because certain mail servers (exim can be configured to do this, for example) check the headers of a mail before accepting it.
    The solution:
    To add a valid “Sender:” line to the headers.
    I’ve had a quick look and it seems to be as simple as adding 2 lines to wp-includes/functions.php. These add “Sender: $user->user_email” and “Sender: $admin_email” to $message_headers.
    The request:
    Would it be possible to get these 2 lines added to the mainstream code? I can’t see why it would have any negative impact, and it would save me having to patch every new release for use on our server (and I’m sure other people would find it useful too).
    Many thanks, and keep up the good work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator James Huff


    Halfelf Minion 🚀

    Go to Options/Discussions. Do you have “User must fill out name and email” checked?

    Yep. But that only gets added to the From: header of the email, and if it’s invalid, it bounces. By adding the author or admin email as the Sender: header you guarantee the mail’s accepted, regardless of whether the commenter puts in a valid URL or not.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Valid Sender: header in email headers’ is closed to new replies.