我在线阅读了很多论坛帖子,说我需要设置$mime_drivers [‘HTML’] [‘inline’] = true;在mime_drivers.PHP中.但是,如果我改变这个文件,恐怕cPanel会覆盖它. cPanel倾向于覆盖我修改的文件.
如何在cPanel下配置Horde来显示HTML电子邮件?
解决方法 这个问题困扰了我很久了.几个月前我无法找到答案,所以我刚刚编辑了/usr/local/cpanel/base/horde/imp/config/mime_drivers.PHP,专门更改了部分:$mime_drivers['imp']['HTML'] = array( 'inline' => false,
至:
$mime_drivers['imp']['HTML'] = array( 'inline' => true,
我担心,每次cPanel更新部落时,这种变化都会丢失,我的用户会抱怨.现在,我相信我找到了解决方案. (但是Horde还没有更新,所以我无法确定这是否有效).
在包含imp / config / mime_drivers.PHP后,Horde将检查目录imp / config / mime_drivers.d /,如果找到,将包含()该目录中以.PHP结尾的所有文件.此目录在cPanel下不存在,因此可以创建它而不必担心被覆盖.
文件/usr/local / cpanel / src / 3rdparty / gpl / README-horde包含有关cPanel如何更新Horde的详细信息,以及有关定制部落的说明.该文件的一些相关例外提供了关于如何永久地进行我想要的自定义的线索:
During the maintenance phase of /scripts/upcp and
The Horde installation is wiped clean (rm -rf /usr/local/cpanel/base/horde). Using the version specifIEd in update-horde,the appropriate Horde source tarball will be extracted to /usr/local/cpanel/base.
/scripts/maintenance,the webmail script found at
/usr/local/cpanel/install/webmail is executed. This in turn executes
/usr/local/cpanel/bin/update-horde. Presented below is an outline of
steps update-horde performs:[…]
After determining which tarball to use for the source install,and
extracting it,the update-horde script checks for the following:06002
As with the prior tarballs,the value of $hordever must match what is defined in the update-horde script. The overlay tarball
provIDes a simple way of customizing specific aspects of Horde. For
example,certain graphics,themes,modules,plugins and the like can
all be provIDed as an overlay. Since it is extracted into
/usr/local/cpanel/base,the contents of the tarball must match the
directory layout found in /usr/local/cpanel/base/horde.
从这个文件我能够发现以下步骤来覆盖内联HTML视图设置如下:
tl; dr:这是步骤:
>在临时目录中,创建cPanel期望的horde / imp / config / mime_drivers.d /目录结构:
mkdir -p /tmp/horde/imp/config/mime_drivers.d
>在该新目录中创建覆盖文件.我将我的名字命名为HTML.PHP,但只要它以.PHP结尾就可以命名
>将以下内容插入/tmp/horde/imp/config/mime_drivers.d/HTML.PHP:
<?PHP/** * HTML driver settings */$mime_drivers['imp']['HTML'] = array( 'inline' => true,'handles' => array( 'text/HTML' ),'icons' => array( 'default' => 'HTML.png' ),/* If you don't want to display the link to open the HTML content in a * separate window,set the following to false. */ 'external' => true,/* Run 'tIDy' on all HTML output? This requires at least version 2.0 of the * PECL 'tIDy' extension to be installed on your system. */ 'tIDy' => false,/* Check for phishing exploits? */ 'phishing_check' => true);
>在/var/cpanel/horde/overlay.tar.gz创建/ tmp / horde目录的.tar.gz版本:
cd /tmptar -czvf /var/cpanel/horde/overlay.tar.gz horde
每次更新部落时,都应通过cPanel扩展此文件,重新添加配置覆盖.
>将/tmp/horde/imp/config/mime_drivers.d/移动到位:
mv /tmp/horde/imp/config/mime_drivers.d /usr/local/cpanel/base/horde/imp/config/
>登录部落进行测试.
总结以上是内存溢出为你收集整理的如何在cPanel下配置Horde来显示HTML电子邮件?全部内容,希望文章能够帮你解决如何在cPanel下配置Horde来显示HTML电子邮件?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)