The MU forums have moved to

Weird Activation email behaviour (6 posts)

  1. Bike
    Posted 16 years ago #

    Well, I think this is a new one.
    Installed WPMU yesterday with latest SVN version on a new WHM/Cpanel VPS. After a lot of extremely fast responses from SLhost (they deserve the plug!), I got it up and running.

    Set-up with Subdomains works, and activation emails are being sent and the link works, blogs and users are being activated! It's truly wonderful. But the silly thing is:
    - the 2nd email with confirmation and login details only arrives normally when signing up as a user only (so no blog)
    - when signing up for a new blog, the person signing up gets no email (while he got the first one) and the admin gets a bounce.

    There is nothing in the email queue, but there are entries in the mail errorlog, the same as in the headers of the bounce email that gets sent back to the admin (me):

    1 - R=lookuphost T=remote_smtp: SMTP error from remote mail server after end of data: host []: 550 Administrative prohibition

    (only email address and IP changed)

    I tried with 4 different domains on hosted on 3 different servers, so I assume it is something in the sendmail or WPMU functions. Again: when signing up as user only, they get the 2nd email, when signing up for a blog, they do not.

    Any clue why the activation email is accepted by all hosts/servers, but the confirmation email not, at least not when signing up a new blog?

    Thanks, Bike

  2. Bike
    Posted 16 years ago #

    Well I finally solved it and it looks like a bug, but I will let somebody else decide on that:

    After many tests and changes in wpmu_functions.php I found that the emails with account info had these headers that caused the problem:

    "From: "<support@domain.tld>" <<support@domain.tld>>"

    (I replaced my domain for domain.tld above)

    The <brackets> around "admin email" in this code (scroll right):

    	$admin_email = get_site_option( "admin_email" );
    	if( $admin_email == '' )
    		$admin_email = 'support@' . $_SERVER[ 'SERVER_NAME' ];
    	$message_headers = "MIME-Version: 1.0n" . "From: " . get_site_option( "site_name" ) .  " <{$admin_email}>n" . "Content-Type: text/plain; charset="" . get_option('blog_charset') . ""n";

    were causing the problem, but only with the account info for a new blog email, seems that the other emails used the admin email address as defined in the settings.

    When removing the <brackets> the header was:

    "From: "support@domain.tld" <support@domain.tld>"

    And it came through without problems.

    Not sure if there is a reason for these brackets or if they can be removed from all admin email sections?
    Hope this helps others.

  3. hohoo
    Posted 16 years ago #

    I think it is a bug.
    I found the same problem. And your solution works charming!
    Thank you to post this!

  4. drmiketemp
    Posted 16 years ago #

    I've been changing that on my own client's installs for quite some time now. Do note that there's like six places within wp-includes/wpmu-functions.php where it needs to be corrected.

    As to it being a bug or not, I'm at a toss up as I believe it's the mail server (either exim or sendmail) itself that's adding in the extra brackets.

    The extra brackets are an issue though and removing the original set from wpmu-functions.php appears to solve the issue. While the email does get tagged as spam by some places, I'm 99% sure that it's due to inproper spam protection settings as some places just do not like any email sent by php.

    I could have sworn that there was a trac ticket on the subject but I don't see one right off.

    edit: New ticket made:

  5. darhoot
    Posted 16 years ago #

    I edited the wpmu function.php file as stated, but I still cannot get any return emails from either creating a new blog, or creating a new user name.


    Can someone take a look and see if they can figure it out?


  6. drmiketemp
    Posted 16 years ago #

    First place to check would be the mail server's error logs and see if anything gets reported in there.

About this Topic