Bastian,

> [? [:header_field|Subject] ||, Subject: [:dquote|[:header_field|Subject]]]#
> 
> [...]
> and get strange encodings on subjects, most german mails with äöü,
> sometimes with " or , and the following appears in the amavis logfiles:
> 
> Subject:
> "=?iso-8859-1?Q?Testmail_mit_""Anf=FChrungszeichen"",_und,_Kommas?=",
> 
> Is there a way to change the encoding of the log entries?

There currently isn't an easy way to do that. The [:header_field|Subject]
macro call yields a raw Subject header field, exactly as it stands in
a mail header, with no interpretation/decoding of character sets.
To make it somewhat easier to parse it in the log, it gets passed
through a  [:dquote| ... ] macro, which wraps it into double quotes
and doubles any existing double quotes withing the string itself.
The result is then sanitized for control characters and logged.

If it is just the doubling of double quotes that you do not like,
you can omit the call to a dquote macro.

But for converting character sets (e.g. to UTF-8) for logging purposes
there is currently no provision. There are two reasons/excuses for that:
syslog may not like UTF-8 or arbitrary 8-bit characters, and one may
be interested in the original mail header field as it stands in the
mail message.

For logging to SQL however, decoding of character sets in header
fields Subject and From is performed, and SQL fields msgs.subject
and msgs.from_addr receive a decoded text, converted to UTF-8.

  Mark

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
AMaViS-user mailing list
[email protected] 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 Please visit http://www.ijs.si/software/amavisd/ regularly
 For administrativa requests please send email to rainer at openantivirus dot 
org

Reply via email to