Browse Source

Don't start message ID with a dot when no remote port is available

pdontthink 17 years ago
parent
commit
efd332278a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      class/deliver/Deliver.class.php

+ 2 - 1
class/deliver/Deliver.class.php

@@ -496,7 +496,8 @@ class Deliver {
         /* This creates an RFC 822 date */
         /* This creates an RFC 822 date */
         $date = date('D, j M Y H:i:s ', time()) . $this->timezone();
         $date = date('D, j M Y H:i:s ', time()) . $this->timezone();
         /* Create a message-id */
         /* Create a message-id */
-        $message_id = '<' . $REMOTE_PORT . '.';
+        $message_id = '<' . (!empty($REMOTE_PORT) ? $REMOTE_PORT . '.' : '');
+//FIXME: if $REMOTE_ADDR is missing, should we skip this if/else block?  or perhaps try to generate it with some different kind of info?
         if (isset($encode_header_key) && trim($encode_header_key)!='') {
         if (isset($encode_header_key) && trim($encode_header_key)!='') {
             // use encrypted form of remote address
             // use encrypted form of remote address
             $message_id.= OneTimePadEncrypt($this->ip2hex($REMOTE_ADDR),base64_encode($encode_header_key));
             $message_id.= OneTimePadEncrypt($this->ip2hex($REMOTE_ADDR),base64_encode($encode_header_key));