dkimstatus/ 0000755 0000041 0000004 00000000000 11430612474 012305 5 ustar www-data adm dkimstatus/localization/ 0000755 0000041 0000004 00000000000 11430467725 015004 5 ustar www-data adm dkimstatus/localization/de_DE.inc 0000644 0000041 0000004 00000000621 11430201052 016411 0 ustar www-data adm
dkimstatus/localization/es_ES.inc 0000644 0000041 0000004 00000000544 11430201052 016453 0 ustar www-data adm
dkimstatus/localization/cs_CZ.inc 0000644 0000041 0000004 00000000704 11430201052 016454 0 ustar www-data adm
dkimstatus/localization/ro_RO.inc 0000644 0000041 0000004 00000000713 11430201051 016472 0 ustar www-data adm
dkimstatus/localization/en_US.inc 0000644 0000041 0000004 00000000542 11430201052 016464 0 ustar www-data adm
dkimstatus/localization/pl_PL.inc 0000644 0000041 0000004 00000000544 11430201052 016463 0 ustar www-data adm
dkimstatus/localization/fr_FR.inc 0000644 0000041 0000004 00000000602 11430201051 016445 0 ustar www-data adm
dkimstatus/dkimstatus.php 0000644 0000041 0000004 00000007065 11430612367 015217 0 ustar www-data adm 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'));
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']){
$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';
}
}
}
} 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/ 0000755 0000041 0000004 00000000000 11430201053 013535 5 ustar www-data adm dkimstatus/images/authorsign.png 0000644 0000041 0000004 00000001273 11430201052 016430 0 ustar www-data adm PNG
IHDR
sRGB bKGD pHYs tIME tEXtComment Created with GIMPW IDAT(ϝOHq?ީs{5ɵA[jVҡCy
:xNQC
]