pax_global_header 0000666 0000000 0000000 00000000064 11633442257 0014521 g ustar 00root root 0000000 0000000 52 comment=7b9df53e4d92efbd0706ddbbf51023c2852242df
dkimstatus/ 0000775 0000000 0000000 00000000000 11633442257 0013255 5 ustar 00root root 0000000 0000000 dkimstatus/INSTALL 0000664 0000000 0000000 00000000230 11633442257 0014301 0 ustar 00root root 0000000 0000000 untar the folder dkimstatus/ in your roundcubemail/plugins/ directory and add 'dkimstatus' to the list of plugins in roundcubemail/config/main.inc.php
dkimstatus/LICENSE 0000664 0000000 0000000 00000002667 11633442257 0014275 0 ustar 00root root 0000000 0000000 +-------------------------------------------------------------------------+
| DKIMStatus plugin for Roundcube Webmail IMAP Client |
| |
| Copyright (C) 2009-2011, Julien Vehent |
| |
| This program is free software; you can redistribute it and/or modify |
| it under the terms of the GNU General Public License version 2 |
| as published by the Free Software Foundation. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License along |
| with this program; if not, write to the Free Software Foundation, Inc., |
| 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| |
+-------------------------------------------------------------------------+
dkimstatus/dkimstatus.php 0000664 0000000 0000000 00000014631 11633442257 0016163 0 ustar 00root root 0000000 0000000 action == 'show' || $rcmail->action == 'preview') {
$this->add_hook('imap_init', array($this, 'imap_init'));
$this->add_hook('message_headers_output', array($this, 'message_headers'));
} else if ($rcmail->action == '') {
// with enabled_caching we're fetching additional headers before show/preview
$this->add_hook('imap_init', array($this, 'imap_init'));
}
}
function imap_init($p)
{
$rcmail = rcmail::get_instance();
$p['fetch_headers'] = trim($p['fetch_headers'].' ' . strtoupper('Authentication-Results').' '. strtoupper('X-DKIM-Authentication-Results').' ' .strtoupper('X-Spam-Status'));
return $p;
}
function image($image, $alt, $title)
{
return ' ';
}
function message_headers($p)
{
$this->add_texts('localization');
/* First, if dkimproxy did not find a signature, stop here
*/
if($p['headers']->others['x-dkim-authentication-results'] || $p['headers']->others['authentication-results'] || $p['headers']->others['x-spam-status']){
$results = $p['headers']->others['x-dkim-authentication-results'];
if(preg_match("/none/", $results)) {
$image = 'nosiginfo.png';
$alt = 'nosignature';
} else {
/* Second, check the authentication-results header
*/
if($p['headers']->others['authentication-results']) {
$results = $p['headers']->others['authentication-results'];
if(preg_match("/dkim=([a-zA-Z0-9]*)/", $results, $m)) {
$status = ($m[1]);
}
if(preg_match("/domainkeys=([a-zA-Z0-9]*)/", $results, $m)) {
$status = ($m[1]);
}
if($status == 'pass') {
/* Verify if its an author's domain signature or a third party
*/
if(preg_match("/[@][a-zA-Z0-9]+([.][a-zA-Z0-9]+)?\.[a-zA-Z]{2,4}/", $p['headers']->from, $m)) {
$authordomain = $m[0];
if(preg_match("/header\.i=(([a-zA-Z0-9]+[_\.\-]?)+)?($authordomain)/", $results) ||
preg_match("/header\.from=(([a-zA-Z0-9]+[_\.\-]?)+)?($authordomain)/", $results)) {
$image = 'authorsign.png';
$alt = 'verifiedsender';
$title = $results;
} else {
$image = 'thirdpty.png';
$alt = 'thirdpartysig';
$title = $results;
}
}
}
/* If signature proves invalid, show appropriate warning
*/
else if ($status) {
$image = 'invalidsig.png';
$alt = 'invalidsignature';
$title = $results;
}
/* If no status it can be a spf verification
*/
else {
$image = 'nosiginfo.png';
$alt = 'nosignature';
}
/* Third, check for spamassassin's X-Spam-Status
*/
} else if ($p['headers']->others['x-spam-status']) {
$image = 'nosiginfo.png';
$alt = 'nosignature';
/* DKIM_* are defined at: http://search.cpan.org/~kmcgrail/Mail-SpamAssassin-3.3.2/lib/Mail/SpamAssassin/Plugin/DKIM.pm */
$results = $p['headers']->others['x-spam-status'];
if(preg_match_all('/DKIM_[^,]+/', $results, $m)) {
if(array_search('DKIM_SIGNED', $m[0]) !== FALSE) {
if(array_search('DKIM_VALID', $m[0]) !== FALSE) {
if(array_search('DKIM_VALID_AU', $m[0])) {
$image = 'authorsign.png';
$alt = 'verifiedsender';
$title = 'DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU';
} else {
$image = 'thirdpty.png';
$alt = 'thirdpartysig';
$title = 'DKIM_SIGNED, DKIM_VALID';
}
} else {
$image = 'invalidsig.png';
$alt = 'invalidsignature';
$title = 'DKIM_SIGNED';
}
}
}
}
}
} else {
$image = 'nosiginfo.png';
$alt = 'nosignature';
}
if ($image && $alt) {
$p['output']['from']['value'] = $this->image($image, $alt, $title) . $p['output']['from']['value'];
}
return $p;
}
}
dkimstatus/images/ 0000775 0000000 0000000 00000000000 11633442257 0014522 5 ustar 00root root 0000000 0000000 dkimstatus/images/BIGICONS.TXT 0000664 0000000 0000000 00000000436 11633442257 0016323 0 ustar 00root root 0000000 0000000
I personnally prefer small icons (13*13pixels),
but if you like them bigger,
you can use the ones in the tar file,
they are 30*30pixels and expend a little bit the
height of the 'From' line of roundcube.
Just move the small icons somewhere else and untar
the archive in this folder.
dkimstatus/images/authorsign.png 0000664 0000000 0000000 00000001273 11633442257 0017416 0 ustar 00root root 0000000 0000000 PNG
IHDR
sRGB bKGD pHYs tIME tEXtComment Created with GIMPW IDAT(ϝOHq?ީs{5ɵA[jVҡCy
:xNQC
]