View Issue Details

IDProjectCategoryView StatusLast Update
0011123mantisbtemailpublic2010-04-23 23:22
Reporterthobleone_oleco_net Assigned Tovboctor  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.1.8 
Summary0011123: Duplicate Message ID Header
Description

A duplicate but different message ID header is being send in notification emails on submitted bugs because both the email_api.php and the class.phpmailer.php add these headers.

If more than one notification email is being send to the same mail server, one of these mails might be discarded if this server filters duplicates based on the Message-ID header.

Steps To Reproduce
  • create a project with more than one member accounts.
  • make sure you can look at the email header of the notification mails
  • configure mantis to use the smtp email send option
  • repot a new issue
  • have a look at the resulting notification email headers
  • have an email server that filters and removes duplicates based on the message-id header
Additional Information

The email_api.php adds an identical Message-ID header for emails of type 'email_notification_title_for_action_bug_submitted' trying to ensure threading of notification emails (line 953 ff). All recipients will get the same header here.

The class.phpmailer.php adds the but unique second Message-ID header for each email send (line 798).

TagsNo tags attached.

Relationships

duplicate of 0010040 closedrombert Email notification from new bug report submission Message-ID headers not RFC 822 compliant 

Activities

thobleone_oleco_net

thobleone_oleco_net

2009-11-04 13:12

reporter   ~0023568

related to Issue ID 0010040

vboctor

vboctor

2009-11-04 21:57

manager   ~0023575

  1. What email server are you using?
  2. Please provide an attachment or paste the headers of a message showing the duplicate header and identifying which one is generated by phpmailer vs MantisBT.
thobleone_oleco_net

thobleone_oleco_net

2009-11-07 08:53

reporter   ~0023612

Here is an example of the email headers. Sorry that I can't really tell about the email server software. The server itself is run by an ISP. By their support I got the information that a duplicate filter is running that works mainly based on the message-id header.

The first Message-ID header containing the host name is put in place by the PHPMailer class, the second one is put there by the email_api. I was able to resolve the issue modifying the email_api class around line 953 by the code posted below the mail headers. Perhaps its worth considering this change being a configuration option?

Return-Path: <mantisbt@myanonymizeddomain.de>
Delivery-Date: Wed, 28 Oct 2009 21:20:48 +0100
Received: from server22.myanonymizedprovider.de (server22.myanonymizedprovider.de [the.ipadress.notshown.sorry])
by mx.myemailprovider.de (node=mxeu1) with ESMTP (Nemesis)
id 0LgZGr-1MQrG641mn-00ncP5 for myemail@myanonymizeddomain.de; Wed, 28 Oct 2009 21:20:48 +0100
Received: (qmail 455 invoked from network); 28 Oct 2009 21:20:46 +0100
Received: from localhost (HELO www.myanonymizeddomain.de) (127.0.0.1)
by localhost with SMTP; 28 Oct 2009 21:20:46 +0100
Date: Wed, 28 Oct 2009 21:20:46 +0100
Return-Path: mantisbt@myanonymizeddomain.de
To: myemail@myanonymizeddomain.de
From: Mantis Bug Tracker <mantisbt@myanonymizeddomain.de>
Subject: [MyProjectName 0000059]: Test Bug Entry Duplicate MsgId
Message-ID: <2ee5c5b5ccef526c81ca5a6b1bb2be9e@myanonymizeddomain.de>
X-Priority: 3
X-Mailer: PHPMailer [version 1.73]
keywords: [MyProjectName]
Message-ID: <0e865bda9eec18ca7c60f794d710e639>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"


Suggested fix below replaces the bug threading headers my a custom Issue-ID header.

if ( $p_message_id == 'email_notification_title_for_action_bug_submitted' ) {

TB removed because duplicate filter on myanonymizedprovider.de

# $t_mail_headers['Message-ID'] = &quot;&lt;{$t_message_md5}>&quot;;
$t_mail_headers['Issue-ID'] = &quot;&lt;{$t_message_md5}>&quot;;

} else {

TB removed because duplicate filter on myanonymizedprovider.de

# $t_mail_headers['In-Reply-To'] = &quot;&lt;{$t_message_md5}>&quot;;
$t_mail_headers['Issue-ID'] = &quot;&lt;{$t_message_md5}>&quot;;

}

vboctor

vboctor

2009-11-07 15:34

manager   ~0023614

I can't repro this on 1.2.x. Here are the headers I get:

Delivered-To: someone@example.com
Received: by 10.142.12.2 with SMTP id 2cs46929wfl;
Sat, 7 Nov 2009 12:22:20 -0800 (PST)
Received: by 10.114.116.12 with SMTP id o12mr9654029wac.83.1257625340206;
Sat, 07 Nov 2009 12:22:20 -0800 (PST)
Return-Path: <admin@example.com>
Received: from boctor-mac.localhost (pool-173-64-186-23.sttlwa.fios.verizon.net [173.64.186.23])
by mx.google.com with ESMTP id 34si2715492pxi.48.2009.11.07.12.22.20;
Sat, 07 Nov 2009 12:22:20 -0800 (PST)
Received-SPF: neutral (google.com: 173.64.186.23 is neither permitted nor denied by best guess record for domain of admin@example.com) client-ip=173.64.186.23;
Authentication-Results: mx.google.com; spf=neutral (google.com: 173.64.186.23 is neither permitted nor denied by best guess record for domain of admin@example.com) smtp.mail=admin@example.com
Received: by boctor-mac.localhost (Postfix, from userid 501)
id BEDDD328CDA; Sat, 7 Nov 2009 12:22:18 -0800 (PST)
To: someone@example.com
Subject: [A 0000022]: asdasdasdasdasdasd
Date: Sat, 7 Nov 2009 12:22:18 -0800
From: Mantis Bug Tracker <noreply@example.com>
Message-ID: <70542271ea90e507365e0860055bdef8@localhost>
X-Priority: 3
X-Mailer: PHPMailer 5.0.2 (phpmailer.codeworxtech.com)
keywords: [A] A_CAT_2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"

I'll mark this as a duplicate of 10040 (see 0010040:0020577)