Summary | Global list of html_image_replacement |
Queue | IMP |
Queue Version | Git master |
Type | Enhancement |
State | Resolved |
Priority | 1. Low |
Owners | slusarz (at) horde (dot) org |
Requester | leandro.damascena (at) gmail (dot) com |
Created | 07/08/2010 (5473 days ago) |
Due | |
Updated | 07/09/2010 (5472 days ago) |
Assigned | |
Resolved | 07/09/2010 (5472 days ago) |
Milestone | |
Patch | No |
Assigned to Michael Slusarz
State ⇒ Resolved
Request #9129: Allow admin to define list of safe e-mail addressesthat will not experience HTML image blocking
http://git.horde.org/diff.php/imp/config/mime_drivers.php.dist?rt=horde-git&r1=0106a25421134e74ab8cfc514492077d22c9dfc4&r2=0d3074deac715da0270637b4398536f6032e7024
http://git.horde.org/diff.php/imp/docs/CHANGES?rt=horde-git&r1=5a820898cfc8b88f235ae52cbc1de20081e04b52&r2=0d3074deac715da0270637b4398536f6032e7024
http://git.horde.org/diff.php/imp/lib/Mime/Viewer/Html.php?rt=horde-git&r1=a6d02a936008e877e0a4d5f615f5349709005451&r2=0d3074deac715da0270637b4398536f6032e7024
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ Global list of html_image_replacement
Type ⇒ Enhancement
State ⇒ New
with remote images (like promotional emails). It generates a problem
due to all the images are blocked and user needs to click in "Show
images"... I think that IMP might be able to read a global conf file
of "allow emails" to always display remote images... I know the user
can do it using html_image_addrbook, but in my point of view this list
is a good global alternative to sysadm
Following is a stupid example of implementation..
In the file: imp/lib/Mime/Viewer/Html.php (line 247)
$headersshowimage = $this->_params['contents']->getHeaderOb();
$fromshowimage = $headersshowimage->getValue('from');
if (!in_array($fromshowimage,$_GLOBAL['allowemails']))
{
if ($inline &&
$GLOBALS['prefs']->getValue('html_image_replacement') &&
preg_match($this->_img_regex, $this->_mimepart->getContents()) &&
(!$GLOBALS['prefs']->getValue('html_image_addrbook') ||
!$this->_inAddressBook())) {
$data = preg_replace_callback($this->_img_regex,
array($this, '_blockImages'), $data);
$status[] = array(
'icon' => Horde::img('mime/image.png'),
'text' => array(
_("Images have been blocked to protect your privacy."),
Horde::link('#', '', 'unblockImageLink') .
_("Show Images?") . '</a>'
)
);
}
}