Re: [AMaViS-user] Malformed UTF-8 character

This is a discussion on Re: [AMaViS-user] Malformed UTF-8 character within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Chris, > >> Apr 1 11:51:00 gateway amavis[2226]: (02226-01) (!!)TROUBLE in > >> check_mail: ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-02-2008
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Malformed UTF-8 character

Chris,

> >> Apr 1 11:51:00 gateway amavis[2226]: (02226-01) (!!)TROUBLE in
> >> check_mail: main_log_entry FAILED: Malformed UTF-8 character
> >> (unexpected continuation byte 0xae, with no preceding start byte) in
> >> split at /usr/ sbin/amavisd line 9492, <GEN11> line 324.


> >> I am using perl-5.8.0-97.EL3 and perl-MailTools-1.77-1.el3.rf

> > You are a brave man running it under perl-5.8.0.

> I am trying not to stray too far from CentOS 3 provided packages.


> > Is your locale set to UTF8 (command: 'locale'). If yes, try setting
> > locale to 'C' in the process starting amavisd.


> My locale is set to en_ZA.UTF-8
> Running under LANG=C does allow the mail to go through.


> > Are you assigning a non-default template to $log_templ in amavisd.conf?

> Yes - I am using the template from amavisd.conf-sample


I believe this all combined is the source of the problem.

Later versions of Perl 5.8 (I believe in 5.8.1) changed the
automatic flagging of file handles to UTF-8 according to a
locale setting. So when a log line is composed of parts
derived from a template (presumed UTF8 in your case but
not in reality) combined with data strings, the result is
somehow wrong (has UTF8 flag on, but contains single-byte
8-bit characters).

The fix is to always set locale to C (LANG=C) in the process
starting amavisd (this is recommended anyway, regardless of
version of Perl), or to upgrade Perl to 5.8.8. Best is to
to both, but I think one or the other would suffice.

Mark

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216...et/marketplace
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:09 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0