View Issue Details

IDProjectCategoryView StatusLast Update
0010040mantisbtemailpublic2016-07-20 17:11
Reporterjpeeler Assigned Torombert  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
OSLinuxOS VersionUbuntu 8.04.1 
Product Version1.1.6 
Summary0010040: Email notification from new bug report submission Message-ID headers not RFC 822 compliant
Description

In particular, the @hostname part is missing:

Message-ID: <fb300c6bcd2798e89e6668479ee8595c>

Additional Information

Two places of interest:

diff --git a/core/email_api.php b/core/email_api.php
index 148254b..6fdf756 100644
--- a/core/email_api.php
+++ b/core/email_api.php
@@ -833,6 +833,12 @@ function email_send( $p_email_data ) {
foreach( $t_email_data->metadata['headers'] as $t_key => $t_value ) {
switch( $t_key ) {
case 'Message-ID':

  • /* Note: hostname can never be blank here as we set metadata[host] just in only location mail gets queued for sending
    • however as spamassasin treats a blank host part as potential spam, only include the hostname if set */
  • if ( !strchr( $t_value, '@' ) && !is_blank( $mail->Hostname ) ) {
  • $t_value = $t_value . '@' . $mail->Hostname
  • }
  •                                 $mail->set( 'MessageID', $t_value );
                                    break;
                            case 'In-Reply-To':

Which seemed to yield: MessageID: <3718723d794b4b75f14cc91587352886>@localhost

But the fix probably works with 1.2.

Tagsemail

Relationships

has duplicate 0011123 closedvboctor Duplicate Message ID Header 

Activities

giallu

giallu

2009-01-10 13:01

reporter   ~0020576

Lately, I was actually wondering why emails from this tracker was all threaded except from the initial one. It turns out not only we are missing the domain part (a mistake from my original implementation) but right now we are not even enclosing the header in brackets.
For instance, here is the header from the mail I received from this issue:

Subject: [mantisbt 0010040]: Email notification from new bug report submission Message-ID headers not RFC 822 compliant
Message-ID: ec74c04a9d43505dd7a7896163fae7c8
X-Priority: 3
X-Mailer: PHPMailer (phpmailer.codeworxtech.com) [version 2.3]
keywords: [mantisbt] email
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"

It would be nice to find out when this happened; if only I could manage to improve my git-fu...

giallu

giallu

2009-01-10 18:49

reporter   ~0020577

Some updates on this. The situation in the 1.1 branch is that we are still running an older phpmailer which is setting a Message-ID regardless if we push a custom one along with the other headers, so outgoing messages have a double Message-ID header.

I originally patched phpmailer as part of 0008706, but the patch I proposed to them was never included, so when they eventually added some very similar code, we picked it up and did not notice the new code is honouring the new message-ID, but not adding anything like brackets and/or hostname.

I'm preparing a patch based on paulr code above for the 1.2 branch. What to do with 1.1 is unclear because we usually do not make big changes in the released version.

jpeeler

jpeeler

2009-01-21 15:13

reporter   ~0020675

I missed previously that there was already an open report for this. This issue is related to issue 0009753.

giallu

giallu

2009-04-07 03:44

reporter   ~0021412

Reminder sent to: jreese, vboctor

If we want to fix this on the 1.1 branch, we need to upgrade phpmailer. Are you okay with the change?

jreese

jreese

2009-04-07 11:37

reporter   ~0021418

Well, in principle, I would agree that since it's fixing a bug, it should be fine. However, how much more will we need to backport from 1.2.x in order to move to the newer version of PHPMailer? If it's only a small bit of effort, then I say go for it; otherwise, I don't think it's a high-enough priority fix for a maintenance release.

giallu

giallu

2009-04-08 05:09

reporter   ~0021429

My guess is "not too much", but my memory may fail...

dhx

dhx

2009-04-08 10:49

reporter   ~0021438

Please note that RFC822 is obsoleted by RFC2822. It would be best to make sure this ticket still applies to the RFC2822 spec before making changes.

giallu

giallu

2009-04-14 11:14

reporter   ~0021525

dhx: you're right, but AFAICT we still need to fix this stuff according to RFC2822

jpeeler

jpeeler

2009-04-22 18:14

reporter   ~0021630

Has a decision been made about this bug? I just heard a report of email notifications being filtered through a Bastion host getting rejected because of the invalid Message-ID.

vboctor

vboctor

2009-11-07 15:38

manager   ~0023615

Losing notifications generates a lot of support requests, so it would be good if we can fix this in 1.1.8 branch.

rombert

rombert

2011-12-06 12:28

reporter   ~0030475

This work fine in 1.2 , should we close the bug?

jpeeler

jpeeler

2011-12-06 13:14

reporter   ~0030478

Since 1.1 isn't maintained and it really is fixed in 1.2, then there's no reason to keep this open.

rombert

rombert

2011-12-06 14:54

reporter   ~0030479

Great, thanks.

Related Changesets

MantisBT: master 69fd1739

2009-01-10 18:23

giallu


Details Diff
Fix 10040: Email notification from new bug report submission Message-ID headers not RFC 822 compliant Affected Issues
0010040
mod - core/email_api.php Diff File

MantisBT: master d5b6cf26

2009-01-10 18:23

giallu


Details Diff
Fix 10040: Email notification from new bug report submission Message-ID headers not RFC 822 compliant Affected Issues
0010040
mod - core/email_api.php Diff File