Index: /trunk/roundcubemail/program/steps/mail/func.inc
===================================================================
--- /trunk/roundcubemail/program/steps/mail/func.inc	(revision 5595)
+++ /trunk/roundcubemail/program/steps/mail/func.inc	(revision 5596)
@@ -891,4 +891,5 @@
   $standard_headers = array('subject', 'from', 'to', 'cc', 'bcc', 'replyto',
     'mail-reply-to', 'mail-followup-to', 'date');
+  $exclude_headers = $attrib['exclude'] ? explode(',', $attrib['exclude']) : array();
   $output_headers = array();
 
@@ -901,4 +902,7 @@
       continue;
 
+    if (in_array($hkey, $exclude_headers))
+      continue;
+
     if ($hkey == 'date') {
       if ($PRINT_MODE)
@@ -938,5 +942,9 @@
 
   $plugin = $RCMAIL->plugins->exec_hook('message_headers_output',
-    array('output' => $output_headers, 'headers' => $MESSAGE->headers));
+    array('output' => $output_headers, 'headers' => $MESSAGE->headers, 'exclude' => $exclude_headers));
+
+  // single header value is requested
+  if (!empty($attrib['valueof']))
+    return Q($plugin['output'][$attrib['valueof']]['value'], ($hkey == 'subject' ? 'strict' : 'show'));
 
   // compose html table
