View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009753 | mantisbt | public | 2008-10-27 15:09 | 2009-06-26 12:05 | |
Reporter | quel | Assigned To | giallu | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | closed | Resolution | fixed | ||
Platform | x86 (intel processor, 32bit) | OS | Debian GNU/Linux | OS Version | 4.0 2.6.18-686 |
Product Version | 1.1.4 | ||||
Summary | 0009753: second Message-Id fails to contain hostname | ||||
Description | I upgraded from 1.0.8 to 1.1.4 and some email notifications from Mantis are rejected by the mail server: Checking logs I saw: It seems to be that the 2nd Message-Id needs to have @hostname.com. This was fixed in: However, it appears to be broken at: The error seems to only appear on newly submitted issues. | ||||
Tags | patch | ||||
Attached Files | 9753.patch (572 bytes)
diff --git a/core/email_api.php b/core/email_api.php index 1f2c496..7e02f93 100644 --- a/core/email_api.php +++ b/core/email_api.php @@ -801,9 +801,8 @@ function email_send( $p_email_data ) { foreach( $t_email_data->metadata['headers'] as $t_key => $t_value ) { switch( $t_key ) { case 'Message-ID': - // Overwrite default Message ID - $mail->set( 'MessageID', $t_value ); + $mail->set( 'MessageID', "<$t_value@{$mail->Hostname}>" ); break; case 'In-Reply-To': $mail->AddCustomHeader( "$t_key: <{$t_value}@{$mail->Hostname}>" ); | ||||
quick and dirty patch (disclaimer: I haven't read any code/style guidelines so it may not conform to such) --- bak_mantis-1.1.4/core/email_api.php 2008-05-30 15:53:29.000000000 -0500
|
|
I've done some testing and code inspection on 1.1.x and 1.2.x, in both cases the message ids are stamped correctly. Basically in case of the submission notification MantisBT sets the message id and host name in PHPMailer which then combines them into the appropriate format. In case of other notifications, MantisBT sets the In-Reply-To header with the full decorated message id + hostname. I have some questions for you:
I've also attached a patch that achieved the same as in your patch but in a more compact way. |
|
Thanks for the much cleaner patch. |
|
Curious on the status of this. I upgraded from 1.1.4 to 1.1.6 but had to manually apply it still. |
|
The issue that I am now having with Mantis 1.1.6 (upgraded from 1.1.1) is that the new issue emails now have 2 Message-ID headers which are being rejected by postfix on the system. Subject: [mod_log_sql 0000094]: UNIX domain socket required for no justified reason I have $g_mail_from set and I have $g_phpMailer_method = 2 (SMTP) |
|
I handled this in 0010040 for the 1.2 branch. see 0010040:0020577 for details about the status on the 1.1 branch |
|
This is fixed in the 1.2 branch, I'll leave 0010040 open for tracking progress on the 1.1 |
|