Valid Sender: header in email headers (3 posts)

  1. Anonymous
    Posted 10 years ago #

    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.

  2. James Huff
    Volunteer Moderator
    Posted 10 years ago #

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

  3. Anonymous
    Posted 10 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.