View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007521 | mantisbt | public | 2006-10-16 12:09 | 2008-10-27 14:24 | |
Reporter | seiji | Assigned To | vboctor | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Gentoo Linux | ||||
Product Version | 1.1.0a1 | ||||
Target Version | 1.1.0 | Fixed in Version | 1.1.0a3 | ||
Summary | 0007521: wrong Message-ID when "Mail Queuing" is used. | ||||
Description | If I set up according to "Setting up Mail Queuing"(http://www.mantisbt.org/wiki/doku.php/mantisbt:setting_up_mail_queuing), the Message-Id of mail which is sent by cron looks wrong, as follows. "bfda4367087f229be890b9a5bf757862@localhost.localdomain" should be | ||||
Steps To Reproduce | http://www.mantisbt.org/wiki/doku.php/mantisbt:setting_up_mail_queuing | ||||
Additional Information | class.phpmailer.php, 1441L "function ServerHostname()" rerurns "localhost.localdomain" when email is sent by cron. | ||||
Tags | No tags attached. | ||||
Attached Files | patch.txt (1,059 bytes)
--- email_api.php.old 2006-10-23 22:36:18.000000000 +0900 +++ email_api.php 2006-10-23 22:36:26.000000000 +0900 @@ -646,6 +646,9 @@ $t_email_data->metadata['priority'] = config_get( 'mail_priority' ); # Urgent = 1, Not Urgent = 5, Disable = 0 $t_email_data->metadata['charset'] = lang_get( 'charset', lang_get_current() ); + $_SERVER = ( isset( $_SERVER ) ) ? $_SERVER : $HTTP_SERVER_VARS; + $t_email_data->metadata['server_name'] = ( isset( $_SERVER['SERVER_NAME'] ) ) ? $_SERVER['SERVER_NAME'] : ''; + $t_email_id = email_queue_add( $t_email_data ); return $t_email_id; @@ -694,6 +697,8 @@ $mail = new PHPMailer; + $mail->Hostname = $t_email_data->metadata['server_name']; + $mail->PluginDir = PHPMAILER_PATH; # @@@ should this be the current language (for the recipient) or the default one (for the user running the command) (thraxisp) @@ -1132,4 +1137,4 @@ return $t_bug_data; } -?> \ �ե��������˲��Ԥ�����ޤ��� +?> | ||||
If message-Id includes "localhost.localdomain", Spam detection Software like SpamAssassin will identify mail as spam. Content analysis details: (10.4 points, 10.0 required) pts rule name description -0.1 CONTENT_TYPE_PRESENT exists:Content-Type |
|
In your patch you set the server to '' if server host is not set. Shouldn't we set it to the domain part of the email address we are sending the message from? |
|
Yes, we should set it. In email_store,
and In email_send, |
|