Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Non-encoded 8bit data in header?

307 views
Skip to first unread message

Pierre Girard

unread,
Dec 5, 2011, 10:39:32 AM12/5/11
to
Hello,
I set up a small ubuntu 10.04 machine with postfix on it and it
seems to be working fine. However on the destination server there's this
message in the headers

X-Amavis-Alert: BAD HEADER, Non-encoded 8-bit data (char C3 hex): Subject:
test \303\251tudiants\n

Is it incorrect for postfix to send unencoded UTF characters in the
header or is it an amavis problem?
The mail is delivered but I'm wondering if there's something to be fixed
or not.

Thanks for your help.

Ralf Hildebrandt

unread,
Dec 5, 2011, 10:43:57 AM12/5/11
to
* Pierre Girard <pierre...@gerad.ca>:
> Hello,
> I set up a small ubuntu 10.04 machine with postfix on it and it
> seems to be working fine. However on the destination server there's this
> message in the headers
>
> X-Amavis-Alert: BAD HEADER, Non-encoded 8-bit data (char C3 hex): Subject:
> test \303\251tudiants\n

Well, so don't send unencoded stuff in the headers.

> Is it incorrect for postfix to send unencoded UTF characters in the
> header or is it an amavis problem?

It's a problem of the sedning application, postfix is merely the
messenger

> The mail is delivered but I'm wondering if there's something to be fixed
> or not.

Headers need to be encoded.

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hil...@charite.de | http://www.charite.de


Wietse Venema

unread,
Dec 5, 2011, 11:14:51 AM12/5/11
to
Pierre Girard:
> Hello,
> I set up a small ubuntu 10.04 machine with postfix on it and it
> seems to be working fine. However on the destination server there's this
> message in the headers
>
> X-Amavis-Alert: BAD HEADER, Non-encoded 8-bit data (char C3 hex): Subject:
> test \303\251tudiants\n

Your mail submission program submits non-compliant email into
Postfix. It should encode message headers that contain non-ASCII
content.

Postfix is an MTA. Its purpose it not to transform malformed email
into well-formed messages.

Wietse

Pierre Girard

unread,
Dec 5, 2011, 11:20:41 AM12/5/11
to
Le 2011-12-05 11:14, Wietse Venema a écrit :
>
> Your mail submission program submits non-compliant email into
> Postfix. It should encode message headers that contain non-ASCII
> content.

Thanks for the information.

The email is sent automatically by the autoupdate program and it's using
mail/mailx to send it.

I'll look around and see if I can change that.

Ralf Hildebrandt

unread,
Dec 5, 2011, 1:48:46 PM12/5/11
to
* Pierre Girard <pierre...@gerad.ca>:

> The email is sent automatically by the autoupdate program and it's
> using mail/mailx to send it.

In that case I'd blame mail/mailx :)
Are you sure it's using those instead of just piping to sendmail?

Pierre Girard

unread,
Dec 6, 2011, 8:51:59 AM12/6/11
to
Le 2011-12-05 13:48, Ralf Hildebrandt a écrit :
> * Pierre Girard<pierre...@gerad.ca>:
>
>> The email is sent automatically by the autoupdate program and it's
>> using mail/mailx to send it.
> In that case I'd blame mail/mailx :)
> Are you sure it's using those instead of just piping to sendmail?

I'm pretty sure. There's this comment in the configuration file:

// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. The package 'mailx'
// must be installed or anything that provides /usr/bin/mail.
Unattended-Upgrade::Mail "us...@example.com";

Also, I sent an email with mail/mailx and had the same result.

I found this bug report that's been going since 2005. It might be fixed
in Natty but we're using 10.04 LTS.

https://bugs.launchpad.net/ubuntu/+source/mailx/+bug/27121

I installed the nail package (which installed heirloom-mailx) and that
seems to be doing the encoding correctly. Since that also changed the
/etc/alternatives/mail, it should fix the automated message as well.

wolfgang

unread,
Dec 6, 2011, 7:34:16 PM12/6/11
to
On 2011-12-06 14:51, Pierre Girard wrote:
> I installed the nail package (which installed heirloom-mailx) and
> that seems to be doing the encoding correctly. Since that also
> changed the /etc/alternatives/mail, it should fix the automated
> message as well.

Since you mention "nail", I'd like to point out that the nail command
version 12.3 7/15/07 - unlike the other mail/mailx versions I have
used - includes an option to attach files. This may be off topic but
worth to know ...

Regards,

wolfgang

0 new messages