diff --git a/config/conf.xml b/config/conf.xml index 5573e1f81..4bcef2471 100644 --- a/config/conf.xml +++ b/config/conf.xml @@ -60,6 +60,10 @@ 30000 + Add Received header + true diff --git a/lib/Compose.php b/lib/Compose.php index 92279a058..df006169b 100644 --- a/lib/Compose.php +++ b/lib/Compose.php @@ -745,7 +745,7 @@ public function buildAndSendMessage( $body, $header, IMP_Prefs_Identity $identity, array $opts = array() ) { - global $injector, $prefs, $registry, $session; + global $injector, $prefs, $registry, $session, $conf; /* Set up defaults. */ $opts = array_merge(array( @@ -798,9 +798,11 @@ public function buildAndSendMessage( $headers = $this->_prepareHeaders($header, $opts); /* Add a Received header for the hop from browser to server. */ - $headers->addHeaderOb( - Horde_Core_Mime_Headers_Received::createHordeHop() - ); + if (!isset($conf['compose']['add_received_header']) || ($conf['compose']['add_received_header'] === true)) { + $headers->addHeaderOb( + Horde_Core_Mime_Headers_Received::createHordeHop() + ); + } /* Add the 'User-Agent' header. */ $headers->addHeaderOb(new Horde_Mime_Headers_UserAgent(