The MU forums have moved to

think you're losing registrations because of bogus emails ? you probably are ! (6 posts)

  1. quenting
    Posted 17 years ago #

    after looking through qmail logs, I've realized one of the reasons so many people complain about not receiving registration emails (making you imagine how many don't either but never complain).
    Some (many actually) email providers, when they receive a mail, verify the sender email actually exists. The thing is, the sender email they verify is not the one in the mail headers (that one is filled by MU), it's the user that's actually used to send the email by your program (typically qmail).
    And the other thing is, in most default installations, this user is not extracted from the mail headers by the mail() system function, it just uses "".

    When the targetted email provider verifies the address, since doesn't exist, they consider the mail as spam and don't deliver.

    Something like this would appear in your mail log:

    @40000000460ce431178199dc info msg 331697: bytes 766 from qp 13103 uid 81
    @40000000460ce43117e65ebc starting delivery 21704: msg 331697 to remote
    @40000000460ce43117e662a4 status: local 0/10 remote 1/20
    @40000000460ce4323a987b0c delivery 21704: failure: _/550-Called:___91.121.0.194/550-Sent:_____RCPT_TO:/550-Response:_511_sorry,_no_mailbox_here_by_that_name_(#5.1.1_-_chkuser)/550_Sender_verify_failed/Giving_up_on_80.168.44.11./STARTTLS_proto=TLSv1;_cipher=DHE-RSA-AES256-SHA;_subject=/C=GB/ST=UK/L=London/O=Amen/OU=Systems/CN=;_issuer=/C=GB/ST=UK/L=London/O=Amen/OU=Systems/;/
    @40000000460ce4323a9886c4 status: local 0/10 remote 0/20
    @40000000460ce43302432b94 bounce msg 331697 qp 13106

    What to do ? You can either configure your mail program with touse a default (existing) user. The problem then is that a difference between this user and the one in headers might trigger another spam filter, and MU uses multiple users to send emails.
    Or, you can modify the wp_mail function so that it passes another argument to php's mail() that forces the user.
    My wp_mail function looks something like this now (in pluggable.php):

    if ( !function_exists('wp_mail') ) :
    function wp_mail($to, $subject, $message, $headers = '',$sender='') {
    if( $headers == '' ) {
    $headers = "MIME-Version: 1.0\n" .
    "From:\n" .
    "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    if($sender=='') {
    return @mail($to, $subject, $message, $headers, '');
    } else {
    return @mail($to, $subject, $message, $headers,'-f'.$sender);

    the '' is the piece that specifies the user to mail(). The function above is modified so that it uses a default email if no headers are provided. MU doesn't pass the sender by default (only the full headers). I've made the choice myself to add an extra parameter to the function and to modify the various calls that are made to this function throughout the code to add the sender to the call. You can parse headers in wp_mail if you prefer having all changes in one location. It'd be nice if this was the default behaviour in MU.

    Anyway, just a heads up.

  2. SteveAtty
    Posted 17 years ago #

    I've been running my own email server for 3 years and I've never seen any destination email server connect back to my server to confirm if a specific sending user exists.

    They may check the EHLO handshake / domain / MX records / IP address of the sender and ensure that they all match up.

    The log entry you've posted looks pretty much like the standard "550 User not known" error from the receiving server.

    Of course you really should always populate the From and the Reply To fields with valid email addresses to ensure bounces get back to you.

  3. streaky
    Posted 17 years ago #

    A common one is where the RDNS is wrong or a domain isn't routable.

    Like say your server thinks it's rdns it, but isn't routable by your MTA, or the other one say the same scenario but the MX doesn't point at the host that's sending mail. That stuff really gets messy.

    Course really all you need to change is the "Site Admin Email" in Site Admin -> Options and it will change the outgoing address anyway... Or it does for me.

  4. quenting
    Posted 17 years ago #

    edit: have to remove html chars from email logs for them to show up correctly

    sorry, but i'm pretty sure this is a validation of the sender email, look in more details.

    This is a user unknown type of log :

    @400000004651ce3e07dd63bc delivery 60451: failure:

    This is the sender verification log :

    delivery 44582: failure:
    _subject=/C=US/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/;_issuer=/C=US/ST=Unknown/L=Unknown/O=Unknown/OU=Unknown/;/ is the user that was sending the emails in qmail, even though some admin email was setup in the headers. is my server's IP, which was called back with a receipt to, my server answered a 511 because the mailbox didn't exist, and the initial email was discarded due to this fact.

    You can see if you've got the problem by looking in your mail logs, if you see for outgoing emails things like:

    @400000004651d4b90c3c510c info msg 332178: bytes 506 from qp 25083 uid 81
    @400000004651d4b91252c5e4 starting delivery 60540: msg 332178 to remote

    it means your email server is not properly setup. You should see:
    @400000004651d4b90c3c510c info msg 332178: bytes 506 from qp 25083 uid 81
    @400000004651d4b91252c5e4 starting delivery 60540: msg 332178 to remote

    If you're in the first case, just grep "Sender_verify" in your mail log and see if you have any occurrences. I've had 110000 registrations and some quick stats showed that about 5% of emails were lost due to this phenomenon, so i wouldn't disregard it that fast if i were you.

  5. SteveAtty
    Posted 17 years ago #

    You might be interested in this:

    The docs for Exim and Postfix (which both support sender verification) basically warn against it.

    Exim says that the calls backs should only on a small number of domains (I assume ones that are known to push spam).

    Postfix says that sender address verification cannot simply be turned on for all email - you are likely to lose legitimate mail from mis-configured systems. You almost certainly will have to set up white lists for specific addresses, or even for entire domains.

    I see in your post that the recipient rejecting you is The Planet which is quite ironic given the amount of spam/bots they push out.

    I've checked my email logs dating back as far as I can - 47,000 emails send, not one failure due to sender_verification.

    I've also just done some tests and my WPMU install is sending stuff out with the correct addresses in anonymous name or anything... which I think is being put in by your hosting company.

  6. quenting
    Posted 17 years ago #

    i think it depends on how your mail server is configured / which mail server you're using. I run gentoo with a somewhat default qmail install, and by default qmail sends email as, regardless of the headers included in the email.

About this Topic

  • Started 17 years ago by quenting
  • Latest reply from quenting