Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread John Fawcett
On 29/01/11 00:02, Reindl Harald wrote: > Am 28.01.2011 23:44, schrieb Victor Duchovni: > >> On Fri, Jan 28, 2011 at 11:40:42PM +0100, Reindl Harald wrote: >> >> >>> what i really not understand in this post is why the OP >>> doens not change all his charset/collation to UTF8 >>> to avoid m

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread Victor Duchovni
On Sat, Jan 29, 2011 at 12:02:17AM +0100, Reindl Harald wrote: > > The input may not be valid UTF8. Not all octet strings are valid > > UTF8. Someone posted a solution using > > Yes but this seems not the problem as long the message is "mix of collations" Fixing a tiny subset of use-cases is not

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread Reindl Harald
Am 28.01.2011 23:44, schrieb Victor Duchovni: > On Fri, Jan 28, 2011 at 11:40:42PM +0100, Reindl Harald wrote: > >> what i really not understand in this post is why the OP >> doens not change all his charset/collation to UTF8 >> to avoid mixing? > > The input may not be valid UTF8. Not all octet

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread Victor Duchovni
On Fri, Jan 28, 2011 at 11:40:42PM +0100, Reindl Harald wrote: > what i really not understand in this post is why the OP > doens not change all his charset/collation to UTF8 > to avoid mixing? The input may not be valid UTF8. Not all octet strings are valid UTF8. Someone posted a solution using

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread Reindl Harald
what i really not understand in this post is why the OP doens not change all his charset/collation to UTF8 to avoid mixing? Am 28.01.2011 23:37, schrieb John Fawcett: > On 28/01/11 21:56, Wietse Venema wrote: >> John Fawcett: >> >>> On 28/01/11 13:12, Wietse Venema wrote: >>> John Faw

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread John Fawcett
On 28/01/11 21:56, Wietse Venema wrote: > John Fawcett: > >> On 28/01/11 13:12, Wietse Venema wrote: >> >>> John Fawcett: >>> >>> If UTF8SMTP support is introduced in Postfix, what rules should Postfix >>> follow for interpreting email addresses? That if there is at least one

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread Wietse Venema
John Fawcett: > On 28/01/11 13:12, Wietse Venema wrote: > > John Fawcett: > > > > If UTF8SMTP support is introduced in Postfix, what rules should Postfix > >> follow for interpreting email addresses? That if there is at least one > >> non-ascii character, the string is treated as utf8 else it is

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread John Fawcett
On 28/01/11 13:12, Wietse Venema wrote: > John Fawcett: > > If UTF8SMTP support is introduced in Postfix, what rules should Postfix >> follow for interpreting email addresses? That if there is at least one >> non-ascii character, the string is treated as utf8 else it is treated as >> ascii? What

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread Wietse Venema
John Fawcett: > On 27/01/11 13:19, Wietse Venema wrote: > > John Fawcett: > > > >> Claudio > >> the problem is happening because your column definition for "domain" > >> column has character set latin1 (which by default has collation > >> latin_swedish_ci) and the data being passed from postfix

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-28 Thread John Fawcett
On 27/01/11 13:19, Wietse Venema wrote: > John Fawcett: > >> Claudio >> the problem is happening because your column definition for "domain" >> column has character set latin1 (which by default has collation >> latin_swedish_ci) and the data being passed from postfix is in utf8 >> (which by defa

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-27 Thread Wietse Venema
John Fawcett: > Claudio > the problem is happening because your column definition for "domain" > column has character set latin1 (which by default has collation > latin_swedish_ci) and the data being passed from postfix is in utf8 > (which by default has collation utf8_general_ci). Actually, there

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-26 Thread John Fawcett
On 26/01/11 12:05, Claudio Prono wrote: > Uhm, i have another information about that case: the mail are sended to > postfix from an antispam appliance (Symantec). Can be a problem of > config of that antispam results illegal characters are sended to postfix? > > Anyway, here is my conf > > user = p

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-26 Thread Mark Martinec
Claudio Prono wrote: > Uhm, i have another information about that case: the mail are sended to > postfix from an antispam appliance (Symantec). Can be a problem of > config of that antispam results illegal characters are sended to postfix? > Can i add something to solve that problem? That is possi

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-26 Thread Claudio Prono
Jeroen Geilman ha scritto: > On 1/25/11 1:16 PM, Mark Martinec wrote: >>> How does MySQL know that the query parameter(s) should be UTF-8 >>> and not ISO LATIN mumble or something else? >> By a client executing a command: >>SET NAMES 'utf8' >> as far as I can tell. >> >> SET NAMES indicates w

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-25 Thread Jeroen Geilman
On 1/25/11 1:16 PM, Mark Martinec wrote: How does MySQL know that the query parameter(s) should be UTF-8 and not ISO LATIN mumble or something else? By a client executing a command: SET NAMES 'utf8' as far as I can tell. SET NAMES indicates what character set the client will use to send SQL

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-25 Thread Mark Martinec
> How does MySQL know that the query parameter(s) should be UTF-8 > and not ISO LATIN mumble or something else? By a client executing a command: SET NAMES 'utf8' as far as I can tell. SET NAMES indicates what character set the client will use to send SQL statements to the server. http://dev.mys

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-25 Thread Wietse Venema
Claudio Prono: > > > >> There is also an initiative to allow UTF-8 characters to appear in SMTP > >> (RFC 5336 and related documents). A malformed UTF-8 could easily > >> appear there, despite being prohibited. If an SQL database would > >> declare an e-mail address field of an UTF-8 data type, a

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-25 Thread Claudio Prono
>> There is also an initiative to allow UTF-8 characters to appear in SMTP >> (RFC 5336 and related documents). A malformed UTF-8 could easily >> appear there, despite being prohibited. If an SQL database would >> declare an e-mail address field of an UTF-8 data type, a lookup could >> abort when

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Jeroen Geilman
On 1/24/11 8:07 PM, Mark Martinec wrote: Jeroen Geilman wrote: Urgh. Which RFC are you reading ? I quote: Systems MUST NOT define mailboxes in such a way as to require the use in SMTP of non-ASCII characters True (tell it to generators of malicious mail or just incompetent sending sw). This

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Wietse Venema
Mark Martinec: > Jeroen Geilman wrote: > > > Urgh. Which RFC are you reading ? > > I quote: > > Systems MUST NOT define mailboxes in such a way as to require the use > > in SMTP of non-ASCII characters > > True (tell it to generators of malicious mail or just incompetent sending sw). > This does

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Victor Duchovni
On Mon, Jan 24, 2011 at 08:07:33PM +0100, Mark Martinec wrote: > There is also an initiative to allow UTF-8 characters to appear in SMTP > (RFC 5336 and related documents). I looked at these RFCs, I am not encouraged by what I see. They look deeply flawed... -- Viktor.

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Mark Martinec
Jeroen Geilman wrote: > Urgh. Which RFC are you reading ? > I quote: > Systems MUST NOT define mailboxes in such a way as to require the use > in SMTP of non-ASCII characters True (tell it to generators of malicious mail or just incompetent sending sw). This does not prevent illegal data to appe

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Victor Duchovni
On Mon, Jan 24, 2011 at 06:51:09PM +0100, Jeroen Geilman wrote: >> Right, as it should be. Envelope addresses are not associated with any >> character set according to RFC 5321, they are just strings of octets. > > Urgh. Which RFC are you reading ? Pedantically correct, but useless. Mark is well

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Jeroen Geilman
On 1/24/11 4:52 PM, Mark Martinec wrote: What MySQL makes of such data is up to the MySQL client and server libraries, but Postfix does not promise that the input will be well-formed UTF-8, or ISO Latin or anything of the sort. Just an array of bytes. Right, as it should be. Envelope addresses a

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Claudio Prono
Mark Martinec ha scritto: >> What MySQL makes of such data is up to the MySQL client and server >> libraries, but Postfix does not promise that the input will be well-formed >> UTF-8, or ISO Latin or anything of the sort. Just an array of bytes. >> > > Right, as it should be. Envelope addres

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Mark Martinec
> What MySQL makes of such data is up to the MySQL client and server > libraries, but Postfix does not promise that the input will be well-formed > UTF-8, or ISO Latin or anything of the sort. Just an array of bytes. Right, as it should be. Envelope addresses are not associated with any character

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Victor Duchovni
On Mon, Jan 24, 2011 at 10:17:25AM +0100, Claudio Prono wrote: > On a postfix server i have some strange things in logs files, and i > don't know what's happening. > > Jan 22 23:54:07 mail postfix/trivial-rewrite[10285]: warning: mysql > query failed: Illegal mix of collations (latin1_swedish_ci,

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Reindl Harald
Am 24.01.2011 14:17, schrieb Claudio Prono: > - How i can force UTF8 for all the tables? alter table will be your friend -> mysql manual > - If i change all into UTF8, can be some data loss or some risk at all? normally not because there is nothing in LATIN1 which is not supported in UTF8, in

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Claudio Prono
Reindl Harald ha scritto: > I think this can be a problem and would recommend to > force UTF8 for all tables, if there are only LATIN1 data > they should not be touched in any way and if all is UTF8 > there is no point of mixing > > Well, normally we use LATIN1 historical for some thounsand > tab

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Reindl Harald
I think this can be a problem and would recommend to force UTF8 for all tables, if there are only LATIN1 data they should not be touched in any way and if all is UTF8 there is no point of mixing Well, normally we use LATIN1 historical for some thounsand tables but the whole database for postfix/do

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Claudio Prono
Reindl Harald ha scritto: > show create table tablename; > > Ok, something strange is come out. Here is the list of tables on postfix database: +---+ | Tables_in_postfix | +---+ | admin | | alias | | alias_domain

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Reindl Harald
Am 24.01.2011 11:15, schrieb Claudio Prono: > > > Reindl Harald ha scritto: >> collation is normally a table property >> your mysql-tables charset should be uTF8 >> >> > How i can check this? show create table tablename; signature.asc Description: OpenPGP digital signature

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Claudio Prono
Reindl Harald ha scritto: > collation is normally a table property > your mysql-tables charset should be uTF8 > > How i can check this? > Am 24.01.2011 10:17, schrieb Claudio Prono: > >> Hello all, >> >> On a postfix server i have some strange things in logs files, and i >> don't know what'

Re: postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Reindl Harald
collation is normally a table property your mysql-tables charset should be uTF8 Am 24.01.2011 10:17, schrieb Claudio Prono: > Hello all, > > On a postfix server i have some strange things in logs files, and i > don't know what's happening. > > Jan 22 23:54:07 mail postfix/trivial-rewrite[10285]:

postfix/trivial-rewrite: warning: mysql query failed: Illegal mix of collations

2011-01-24 Thread Claudio Prono
Hello all, On a postfix server i have some strange things in logs files, and i don't know what's happening. Jan 22 23:54:07 mail postfix/trivial-rewrite[10285]: warning: mysql query failed: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation '=' Ja