Advertisement:

Author Topic: Some registration emails bouncing due to missing email message ID  (Read 6134 times)

Offline engr_dood

  • Semi-Newbie
  • *
  • Posts: 58
Hi,

I'm presently using SMF 2.0 RC5.  My forum has manual registration of new members by admin only, which I do using the Admin, Members, Registration, Register New Member menu.  I just sent a registration email using this method, and it bounced with this message:

Quote
xxxx@xxxx.xyz
(generated from xxxx@xxx.xyz)
SMTP error from remote mailer after end of data:
host xxxx.xyz [zzz.zzz.zzz.zzz]: 550-RFC2822 says that all mail SHOULD have a Message-ID header.
550 Most messages without it are spam, so your mail has been rejected.

I wasn't sure whether this was an SMF thing or a hosting provider thing, so I did a couple of experiments.  First I used my host's email server to send an email to myself using Thunderbird.  The message ID was present in the received email.  Second, I used the "News" feature of SMF to send an email to myself using my host's email server (same server as the first experiment).  The message ID was not present in the received email.

So it looks like the lack of a message ID in registration emails is causing some of them to be rejected as spam by some servers.  I've had some problems with members not receiving their emails in the past, or them showing up in their spam folder, so I wonder if this might be more common than previously thought.  It's the first time I've actually gotten an explicit bounce message informing me what the exact problem was.
« Last Edit: April 26, 2011, 05:15:36 PM by engr_dood »

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,442
Re: Some registration emails bouncing due to missing email message ID
« Reply #1 on: November 18, 2011, 08:51:22 AM »
are you still having this issue?

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: Some registration emails bouncing due to missing email message ID
« Reply #2 on: June 19, 2012, 12:03:38 PM »
Looking at the code it seems that the Message-ID is sent only for a couple of specific actions (PMs and notifications).

What about using the action if available and nothing else is specified?


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,851
    • StoryBB/StoryBB on GitHub
Re: Some registration emails bouncing due to missing email message ID
« Reply #3 on: January 17, 2014, 12:08:41 AM »
This should now be fixed in 2.1
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 619
  • Gender: Male
    • Satellite Fun
Re: Some registration emails bouncing due to missing email message ID
« Reply #4 on: January 23, 2019, 08:36:39 AM »
Sorry to bump an old thread. But this is still an issue. For example it also happens when a birthday email is send out.
Quote
X-ACL-Warn: Adding Message-ID header because it is missing!
So a message-id is not send in 2.0.15.

Since this is known and fixed in 2.1, is this fixable by myself by doing some easy edits somewhere? Or is this a lot of code change? I presume the last since this is not fixed in the complete 2.0 branche and it was already known since the RC5?
Greetings, Black Tiger

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some registration emails bouncing due to missing email message ID
« Reply #5 on: January 23, 2019, 11:31:27 AM »
Two options update sub-post.php and set a value for messageid that code wasn't really change in 2.1
What changed was for instance birthday emails was changed in sources/schedulded tasks
"function scheduled_birthdayemails()"

Code: [Select]
sendmail($recp['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 4);
To
Code: [Select]
sendmail($recp['email'], $emaildata['subject'], $emaildata['body'], null, 'birthday', false, 4);
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 619
  • Gender: Male
    • Satellite Fun
Re: Some registration emails bouncing due to missing email message ID
« Reply #6 on: January 23, 2019, 11:50:59 AM »
Thank you.
I changed the second null to 'birthday' as you suggested in the sources/scheduledtasks.php.

But what needs to be updated in Subs-Post.php? Because there is no string 'birthday' in there anywhere.

I also see these double null statements in other e-mail lines, like this:
Code: [Select]
                $emaildata = loadEmailTemplate('scheduled_approval', $replacements, $current_language);

                // Send the actual email.
                sendmail($member['email'], $emaildata['subject'], $emaildata['body'], null, null, false, 2);
Looks like this is send after an approval. Can this second null simply be changed to 'approval'?

Which also makes me wonder if this issue is also occuring on a pm notification and thread notification.
If yes, does those need change to and do you know where I can find them?
Greetings, Black Tiger

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some registration emails bouncing due to missing email message ID
« Reply #7 on: January 23, 2019, 11:53:18 AM »
Yup yes change the second null on all those and that will fix the message-id issue.
There were no changes made to subs-post.php

You can put any word or phrase there for the second null in quotes.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 619
  • Gender: Male
    • Satellite Fun
Re: Some registration emails bouncing due to missing email message ID
« Reply #8 on: January 23, 2019, 12:16:52 PM »
Oke, thank you for the quick reply.

Problem is I can't find those for pm and thread notification in the scheduledtask.php file.

But since you also mentioned the Subs-Post.php, what do I have to do in there?
Greetings, Black Tiger

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some registration emails bouncing due to missing email message ID
« Reply #9 on: January 23, 2019, 12:29:38 PM »
They would be in other files in the sources folder.

To ensure all.
Add like a line in that function sendmail
If (empty($message_id))
$message_id = 'email';

That will just set a messagid no matter what if it is empty


Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 619
  • Gender: Male
    • Satellite Fun
Re: Some registration emails bouncing due to missing email message ID
« Reply #10 on: January 23, 2019, 12:39:51 PM »
Oh that's even better.
Thank you very much!!

But I'm no coder.
Where exactly do I have to put that line?
Or can I put it anywhere I want? In the ScheduledTaks.php?
Greetings, Black Tiger

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some registration emails bouncing due to missing email message ID
« Reply #11 on: January 23, 2019, 12:57:51 PM »
in sources/subs-post.php
in the sendnail function
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 619
  • Gender: Male
    • Satellite Fun
Re: Some registration emails bouncing due to missing email message ID
« Reply #12 on: January 23, 2019, 01:04:14 PM »
Ah I think I found some existing stuff in Subs-post.php I could use when searching for mail in those files:

Code: [Select]
// Send off an email.
function sendmail($to, $subject, $message, $from = null, $message_id = null, $send_html = false, $priority = 3, $hotmail_fix = null$
{
        global $webmaster_email, $context, $modSettings, $txt, $scripturl;
        global $smcFunc;

I presume this would be the same you suggested? Could you confirm this is correct?

Change:
Code: [Select]
// Send off an email.
function sendmail($to, $subject, $message, $from = null, $message_id = null, $send_html = false, $priority = 3, $hotmail_fix = null$
to
Code: [Select]
// Send off an email.
function sendmail($to, $subject, $message, $from = null, $message_id = 'email', $send_html = false, $priority = 3, $hotmail_fix = null$

Or is it better to put your solution above, or below this line?
Greetings, Black Tiger

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some registration emails bouncing due to missing email message ID
« Reply #13 on: January 23, 2019, 01:09:27 PM »
Better solution before since those calls are passing Null to it already and we want to override it putting in the function declaration won't make any changes.
Add code after
Code: [Select]
global $webmaster_email, $context, $modSettings, $txt, $scripturl;
        global $smcFunc;
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Black Tiger

  • Full Member
  • ***
  • Posts: 619
  • Gender: Male
    • Satellite Fun
Re: Some registration emails bouncing due to missing email message ID
« Reply #14 on: January 23, 2019, 01:24:10 PM »
Great, I put it there.

Thank you very much for your support and patience with me.
Greetings, Black Tiger

Offline vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 21,626
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Some registration emails bouncing due to missing email message ID
« Reply #15 on: January 23, 2019, 01:25:51 PM »
glad to help
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro