Hi,
Here a very small patch for roundcube-cvs-20060413 (the one I run) and
the revision-282.
If a mail is marked as spam by SpamAssassin (X-Spam-Flag in headers) the
message is hightlighted in light green in message list. This can be
easily "disabled" by commentting the related section in the CSS.
Hope you'll find this useful.
Les informations contenues dans ce message électronique peuvent être de nature
confidentielle et soumises à une obligation de secret. Elles sont destinées à
l'usage exclusif du réel destinataire. Si vous n'êtes pas le réel destinataire
ou si vous recevez ce message par erreur, merci de nous le notifier
immédiatement en le retournant à l'adresse de son émetteur.
The information contained in this e-mail may be privileged and confidential. It
is intended for the exclusive use of the designated recipients named above. If
you are not the intended recipient or if you receive this e-mail in error,
please notify us immediatly and return the original message at the address of
the sender.
diff -ruN roundcubemail-cvs-20060413/program/lib/imap.inc
/var/www/roundcubemail-cvs-20060413/program/lib/imap.inc
--- roundcubemail-cvs-20060413/program/lib/imap.inc 2006-03-27
21:06:30.000000000 +0200
+++ /var/www/roundcubemail-cvs-20060413/program/lib/imap.inc 2006-07-27
12:40:13.000000000 +0200
@@ -1212,7 +1212,7 @@
/* FETCH date,from,subject headers */
$key="fh".($c++);
- $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM
TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE
MESSAGE-ID REFERENCE)])\r\n";
+ $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM
TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE
MESSAGE-ID REFERENCE X-SPAM-FLAG)])\r\n";
if (!fputs($fp, $request)) return false;
do{
@@ -1261,6 +1261,7 @@
$result[$id]->from = $headers["from"];
$result[$id]->to = str_replace("\n", " ",
$headers["to"]);
$result[$id]->subject = str_replace("\n", "",
$headers["subject"]);
+ $result[$id]->junk = array_key_exists("x-spam-flag",
$headers) ? true : false;
$result[$id]->replyto = str_replace("\n", " ",
$headers["reply-to"]);
$result[$id]->cc = str_replace("\n", " ",
$headers["cc"]);
$result[$id]->bcc = str_replace("\n", " ",
$headers["bcc"]);
@@ -2079,4 +2080,4 @@
return (iil_C_Expunge($conn, $folder) >= 0);
}
-?>
\ No newline at end of file
+?>
diff -ruN roundcubemail-cvs-20060413/program/steps/mail/func.inc
/var/www/roundcubemail-cvs-20060413/program/steps/mail/func.inc
--- roundcubemail-cvs-20060413/program/steps/mail/func.inc 2006-04-06
19:35:04.000000000 +0200
+++ /var/www/roundcubemail-cvs-20060413/program/steps/mail/func.inc
2006-07-27 12:42:40.000000000 +0200
@@ -406,11 +406,12 @@
// set attachment icon
if ($attrib['attachmenticon'] && preg_match("/multipart\/m/i",
$header->ctype))
$attach_icon = $attrib['attachmenticon'];
-
- $out .= sprintf('<tr id="rcmrow%d" class="message%s%s %s">'."\n",
+
+ $out .= sprintf('<tr id="rcmrow%d" class="message%s%s%s %s">'."\n",
$header->uid,
$header->seen ? '' : ' unread',
$header->deleted ? ' deleted' : '',
+ $header->junk ? ' junk' : '',
$zebra_class);
$out .= sprintf("<td class=\"icon\">%s</td>\n", $message_icon ?
sprintf($image_tag, $skin_path, $message_icon, '') : '');
@@ -1470,4 +1471,4 @@
}
-?>
\ No newline at end of file
+?>
diff -ruN roundcubemail-cvs-20060413/skins/default/mail.css
/var/www/roundcubemail-cvs-20060413/skins/default/mail.css
--- roundcubemail-cvs-20060413/skins/default/mail.css 2006-04-04
23:41:22.000000000 +0200
+++ /var/www/roundcubemail-cvs-20060413/skins/default/mail.css 2006-07-27
12:47:01.000000000 +0200
@@ -439,6 +439,12 @@
background-color: #FFFFFF;
}
+#messagelist tr.junk
+{
+ /*font-style: oblique;*/
+ background-color: #e0ffcc;
+}
+
#messagelist tr.selected td
{
font-weight: bold;
diff -ruN roundcubemail-rev282.orig/program/lib/imap.inc
roundcubemail-rev282.junk/program/lib/imap.inc
--- roundcubemail-rev282.orig/program/lib/imap.inc 2006-07-27
13:35:41.000000000 +0200
+++ roundcubemail-rev282.junk/program/lib/imap.inc 2006-07-27
13:41:56.000000000 +0200
@@ -1231,7 +1231,7 @@
/* FETCH date,from,subject headers */
$key="fh".($c++);
- $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM
TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE
MESSAGE-ID REFERENCE)])\r\n";
+ $request=$key." FETCH $message_set (BODY.PEEK[HEADER.FIELDS (DATE FROM
TO SUBJECT REPLY-TO IN-REPLY-TO CC BCC CONTENT-TRANSFER-ENCODING CONTENT-TYPE
MESSAGE-ID REFERENCE X-SPAM-FLAG)])\r\n";
if (!fputs($fp, $request)) return false;
do{
@@ -1280,6 +1280,7 @@
$result[$id]->from = $headers["from"];
$result[$id]->to = str_replace("\n", " ",
$headers["to"]);
$result[$id]->subject = str_replace("\n", "",
$headers["subject"]);
+ $result[$id]->junk = array_key_exists("x-spam-flag",
$headers) ? true : false;
$result[$id]->replyto = str_replace("\n", " ",
$headers["reply-to"]);
$result[$id]->cc = str_replace("\n", " ",
$headers["cc"]);
$result[$id]->bcc = str_replace("\n", " ",
$headers["bcc"]);
diff -ruN roundcubemail-rev282.orig/program/steps/mail/func.inc
roundcubemail-rev282.junk/program/steps/mail/func.inc
--- roundcubemail-rev282.orig/program/steps/mail/func.inc 2006-07-27
13:35:45.000000000 +0200
+++ roundcubemail-rev282.junk/program/steps/mail/func.inc 2006-07-27
13:41:56.000000000 +0200
@@ -422,11 +422,12 @@
// set attachment icon
if ($attrib['attachmenticon'] && preg_match("/multipart\/m/i",
$header->ctype))
$attach_icon = $attrib['attachmenticon'];
-
- $out .= sprintf('<tr id="rcmrow%d" class="message%s%s %s">'."\n",
+
+ $out .= sprintf('<tr id="rcmrow%d" class="message%s%s%s %s">'."\n",
$header->uid,
$header->seen ? '' : ' unread',
$header->deleted ? ' deleted' : '',
+ $header->junk ? ' junk' : '',
$zebra_class);
$out .= sprintf("<td class=\"icon\">%s</td>\n", $message_icon ?
sprintf($image_tag, $skin_path, $message_icon, '') : '');
diff -ruN roundcubemail-rev282.orig/skins/default/mail.css
roundcubemail-rev282.junk/skins/default/mail.css
--- roundcubemail-rev282.orig/skins/default/mail.css 2006-07-27
13:35:47.000000000 +0200
+++ roundcubemail-rev282.junk/skins/default/mail.css 2006-07-27
13:41:56.000000000 +0200
@@ -450,6 +450,12 @@
background-color: #FFFFFF;
}
+#messagelist tr.junk
+{
+ /*font-style: oblique;*/
+ background-color: #e0ffcc;
+}
+
#messagelist tr.selected td
{
font-weight: bold;