Page 1 of 1

Warning after restart MailScanner

Posted: 18 Jan 2017 14:28
by sbergami
Hi,
I'm new in EFA, after update to version 3.0.1.8 and when MailScanner restart follow message appears:

Could not use Custom Function code MailScanner::CustomConfig::InitSQLBlacklist, it could not be "eval"ed. Make sure the module is correct with perl -wc (Error: DBD::mysql::st execute failed: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' at /usr/share/MailScanner/perl/custom/SQLBlackWhiteList.pm line 142.
) at /usr/share/MailScanner/perl/MailScanner/Config.pm line 1053

Someone can explain to me how to fix this warning?
Thank you
Samuele

Re: Warning after restart MailScanner

Posted: 11 Feb 2017 18:55
by puffen
So I had this too on a fresh install and couldn't find any solution. I finally tracked down a solution, whether it is the correct solution not sure. Basically the database encoding has changed and depending on what version of mysql determines what format. For whatever reason it looks like things are jacked up.

My fresh install has mysql version 5.1.73 (mysql --version) so it doesn't support the latest unicode version. I tracked down the upgrade scripts in the mail watch tools repository:
https://github.com/mailwatch/1.2.0/tree ... 8_Database

Running this one solved my problem:
https://github.com/mailwatch/1.2.0/blob ... o_utf8.sql

If you have mysql version 5.5.3 or newer then this should probably do the trick:
https://github.com/mailwatch/1.2.0/blob ... tf8mb4.sql

I ran the script from Navicat mysql client but you should be able to do this from terminal.

Hope this works for you.

Re: Warning after restart MailScanner

Posted: 11 Feb 2017 20:16
by shawniverson

Re: Warning after restart MailScanner

Posted: 12 Feb 2017 15:11
by shawniverson
puffen wrote: 11 Feb 2017 18:55 So I had this too on a fresh install and couldn't find any solution. I finally tracked down a solution, whether it is the correct solution not sure. Basically the database encoding has changed and depending on what version of mysql determines what format. For whatever reason it looks like things are jacked up.
What version of did you use for the "fresh install"? I verified that all tables are utf8_unicode_ci in both the VM and the upgrade.

Re: Warning after restart MailScanner

Posted: 12 Feb 2017 15:44
by puffen
Good question. Now that I'm looking at my image repository, I believe I took the CentOS-6.8-x86_64-minimal.iso and used the kickstart script.

Re: Warning after restart MailScanner - whitelist not working

Posted: 07 Jul 2017 22:09
by jens
Hi,

i'm facing to this too:

Code: Select all

Restarting MailScanner ...

Could not use Custom Function code MailScanner::CustomConfig::InitSQLWhitelist, it could not be "eval"ed. 
Make sure the module is correct with perl -wc (Error: DBD::mysql::st execute failed: 
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) 
for operation '=' at /usr/share/MailScanner/perl/custom/SQLBlackWhiteList.pm line 142.

) at /usr/share/MailScanner/perl/MailScanner/Config.pm line 1053

and whitelist was not working.......

this happens after i use listimport.sh to replace my whitelist

the script maybe drops the tables and recreates them as utf8_general_ci (could be some default in mysql?)

in my case:
whitelist/to_address
whitelist/to_domain
whitelist/from_address

after changing them back to utf8_unicode_ci all works well again.


i'm still on 3.0.1.8, so this is maybe corrected in later versions

jens

Re: Warning after restart MailScanner

Posted: 09 Jul 2017 21:53
by shawniverson
:oops: Well shoot, listimport.sh needs updated!

Adds to my todo list...