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 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 %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 +{
+}
#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 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 %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 +{
+}
#messagelist tr.selected td { font-weight: bold;
On Thu, 27 Jul 2006, Manu wrote:
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.
Nice. Has there been any more thought into how plugins would work
in roundcube so we can use things like this, but people who don't want it don't have to have it?
Jon Daley wrote:
On Thu, 27 Jul 2006, Manu wrote:
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.
Nice. Has there been any more thought into how plugins would work
in roundcube so we can use things like this, but people who don't want it don't have to have it?
This method is somewhat compatible as the X-Spam-Flag identifier will ONLY appear when an email message has reached the spam threshold limit. So when an email message reaches and/or exceeds the spam threshold limit, the identifier "X-Spam-Flag: YES" will appear. But I don't test the "X-Spam-Flag: NO" form as it shouldn't exist; but this doesn't mean this form doesn't exist in another filter :)
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.
Eric Stadtherr wrote:
This is a good general capability. An icon/symbol in the display might be another option other than the green highlighting (like Thunderbird/Mozilla does with the "recycle" symbol).
I thought to also change the icon and make the look defined in CSS but I stopped when I realized that the icons where not "hardcoded" and not dependant of the style. As I don't know much of roundcube and the implications of this modificatin I didn't do anything more. The lastest reason is that the green highlight fits me well :)
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.
On Thu, 27 Jul 2006 08:13:18 -0400 (EDT), Jon Daley roundcube@jon.limedaley.com wrote:
On Thu, 27 Jul 2006, Manu wrote:
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.
Nice. Has there been any more thought into how plugins would work in roundcube so we can use things like this, but people who don't want it don't have to have it?
Also, SA isn't the only antispam out there, and, AFAIK, each one uses a diferent header to specify the "spamicity" of the mail.
Maybe in the mail view (when visualizing the mail) there could be an extra header line (not mail header, but visualizacion row) with the level of spam of each anti-spam available. Kmail does this and I kind of like it's aproche. It also uses a level bar with colors so one can see the amount of spamicity.
Lic. Martín Marqués | SELECT 'mmarques' || Centro de Telemática | '@' || 'unl.edu.ar'; Universidad Nacional | DBA, Programador, del Litoral | Administrador
Eric Stadtherr wrote:
This is a good general capability. An icon/symbol in the display might be another option other than the green highlighting (like Thunderbird/Mozilla does with the "recycle" symbol).
Also, I know that different junk-mail filters use different headers (other than "X-Spam-Flag"). For example, USA.net uses an "X-USANET-Spam" header, and Yahoo uses "X-YahooFilteredBulk". We could either accumulate a list of known headers that identify spam mail, or make it a $CONFIG item. The only problem with $CONFIG is that administrators would need to know the specific header. Maybe that's something everyone knows, so maybe it's not a big deal.
If they are administrators, they should know (or atleast know how to find out) what header to use.
I like the idea of making it a $CONFIG item, since that would allow admins to disable this feature by simply leaving the $CONFIG empty. (I simply assume that an empty variabel would mean that it would never match anything. If thats not the case, it should be!)
-- R