Page 1 of 1

Regional Subject

Posted: 02 Oct 2014 18:36
by templier
Hi.
I from Russia. In recent messages i see subject as " ðÒÏ×ÅÒËÁ ÒÁÂÏÔÙ ÁÎÔÉÓÐÁÍ-ÆÉÌØÔÒÏ×"
How i can fix it and see our russian subjects with cyrillic?

Re: Regional Subject

Posted: 04 Oct 2014 14:14
by templier
I suspect that i need to change MySQL Database Collation.
I think that i have user - mailwatch.
Where i can to know password?

Re: Regional Subject

Posted: 05 Oct 2014 19:23
by shawniverson

Re: Regional Subject

Posted: 09 Oct 2014 04:05
by templier
http://linuxplayer.org/2011/08/add-utf8 ... atch-1-0-5
I fix only Mailwatch.pm.
Also i fix Collation of table maillog, Database and Mysql to utf8.

Re: Regional Subject

Posted: 10 Oct 2014 01:48
by shawniverson

Re: Regional Subject

Posted: 14 Oct 2014 10:24
by niklausbg
Hi Team,

I need a litle help about patching file 'details.php'.
I used that link http://linuxplayer.org/2011/08/add-utf8 ... atch-1-0-5

point 1.) patch Mailwatch.pm successfully, but point 2.) patch mailscanner/detail.php) is not :(

patching file detail.php
Hunk # 1 FAILED at 147.
Hunk # 2 FAILED at 155.

Best regards,
Nikolay

Re: Regional Subject

Posted: 05 Dec 2014 08:22
by mikhail_dv
Migration from CP1252 ISO 8859-1 Latin-1 to UTF-8 | Миграция

I add to my.cnf

Code: Select all

[mysqld]
character-set-server = utf8
collation-server = utf8_unicode_ci

Code: Select all

# from tools https://github.com/mailwatch/1.2.0/tree/master/tools/UTF8_Database
# from file upgrade_mysql_db_to_utf8.sql

mysql -u mailwatch -p`cat /etc/EFA-Config|awk -F: '/MAILWATCHSQLPWD/ {print($2)}'`
use mailscanner;
ALTER DATABASE `mailscanner` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;
ALTER TABLE `audit_log` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `blacklist` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `inq` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `maillog` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `mcp_rules` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `mtalog` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `outq` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `sa_rules` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `saved_filters` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `spamscores` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `user_filters` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `users` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `whitelist` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
-- Added by Me:
ALTER TABLE `geoip_country` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE `mtalog_ids` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
-- to test - must be CHARSET=utf8 | для теста, таблица в utf8
show create table maillog;
exit


# install support mb-string functions
yum install php-mbstring
service httpd reload

yum install cpan
cpan
install Encoding::FixLatin
And finally changes by request https://github.com/mailwatch/1.2.0/pull/130/files
I patch this files
MailWatch.pm
mailscanner/detail.php
mailscanner/functions.php

Re: Regional Subject

Posted: 08 Dec 2014 22:05
by shawniverson
Excellent! :D I will work on this for the update.

Re: Regional Subject

Posted: 10 Dec 2014 21:37
by Glaster
I successfully changed the encoding to UTF-8 using the procedure of mikhail_dv, but when I view the entire contents of e-mail, there are still question marks instead of some characters.
File viewmail.php not be edited.

Does anyone have any idea how to fix this too ??

Thanks

Re: Regional Subject

Posted: 11 Dec 2014 09:33
by mikhail_dv
viewmail.php and viewpart.php deep depends on lib/pear/Mail/mimeDecode.php and other files...
Update mimeDecode.php from 1.5.5 to 1.6.0 (dev ver) not success. http://pear.php.net/package/Mail_mimeDecode

Re: Regional Subject

Posted: 13 Dec 2014 21:33
by Glaster
This means that, at this moment it is not possible to correct charset in the file viewmail.php ??? (full message text)

It would help me fix charset in the Quarantine report or in e-mails generated by the EFA (eg. {Spam not delivered} ...subject...)

Thanks

Re: Regional Subject

Posted: 21 Mar 2015 07:09
by pdwalker
shawniverson wrote:Excellent! :D I will work on this for the update.
Shawn,

If we attempt to "fix" this now using the suggested changes, will this cause a problem with the 3.1.0.0 update? Or would it be safest just to wait?

(for what it's worth, I'll be dealing with a lot of UTF8, GB2312 and possibly BIG5 encoded messages)

- Paul

Re: Regional Subject

Posted: 23 Mar 2015 20:35
by shawniverson
Problem is already fixed upstream in the MailWatch project, I believe. We just need to simply do a MailWatch update...

Re: Regional Subject

Posted: 22 Sep 2015 05:30
by templier
Hi
Now I have the exact same problem with a fresh install of v3.0.8.
Mysql didn't be fixed in distrib, but mailwatch/mailscanner were fixed.

I have russian subject in web interface, but spam notification has unreadable subject in it.
For example, "{Spam not delivered} Íîâûå "çàðïëàòíûå" ñõåìû, íîâûå ñõåìû ëåãàëüíîãî ôîðìèðîâàíèÿ "êîìïåíñàöèîííûõ ïàêåòîâ". 22_03_2015 01_04 57718"

Re: Regional Subject

Posted: 22 Sep 2015 06:47
by pdwalker
templier

Look at this post. See if those two commands solve your problem.

Re: Regional Subject

Posted: 22 Sep 2015 09:09
by templier
No, this commands don't help me.

Re: Regional Subject

Posted: 26 Sep 2015 13:10
by shawniverson
templier,

I am wondering if MailScanner is having a little trouble with unicode...

Can you share the subject as it should appear?

Re: Regional Subject

Posted: 29 Sep 2015 06:08
by templier
This is original Subject: "Браслет Steel Rage для настоящих мужчин! Когда каждая деталь играет роль..."
This is Subject from Mailscanner: "{Spam not delivered} Áðàñëåò Steel Rage äëÿ íàñòîÿùèõ ìóæ÷èí! Êîãäà êàæäàÿ äåòàëü èãðàåò ðîëü..."

Re: Regional Subject

Posted: 29 Sep 2015 06:10
by templier
spam.PNG
spam.PNG (3.37 KiB) Viewed 12690 times

Re: Regional Subject

Posted: 03 Oct 2015 15:59
by shawniverson