Webmail attachments

From SME Server
Jump to navigationJump to search

Sometimes you may find that attachements added to messages created from within webmail (Horde) in SME 7.5.1. are corrupted (as an expample, drawing files in DWG format). This is due to an incorrect identification of the attachments. To correct this behavoiur you need to get the following library:

wget http://apt.sw.be/redhat/el4/en/i386/dag/RPMS/php-pecl-fileinfo-1.0.4-2.el4.rf.i386.rpm

and then install it:

yum localinstall php-pecl-fileinfo-1.0.4-2.el4.rf.i386.rpm

Create then a custom template fragment for php.ini; start creating the following folder:

/etc/e-smith/templates-custom/etc/php.ini

Create into the folder a file named 25magicmimetime and containing the following instructions:

;Magic mime time
mime_magic.magicfile = "/usr/share/file/magic.mime"
extension=fileinfo.so

Expand template:

expand-template /etc/php.ini

Restarting httpd may be sufficient:

/etc/init.d/httpd restart

If the same problem involves SME 8 the correspondig rpm is:

http://apt.sw.be/redhat/el5/en/i386/dag/RPMS/php-pecl-fileinfo-1.0.4-2.el5.rf.i386.rpm