Discussion:
Mail not Send : INVALID HEADER: INVALID 8-BIT CHARACTERS IN HEADER
Num ber
2006-06-03 21:48:49 UTC
Permalink
Hello and good evening everybody ..

I have a error message when Phpbb send a mail ..
But i don't know why ? could you help me ?

Phpbb send some mail correctly with a php script...
But some mail was not send and i have this reply :

_______________________________________________________
The message WAS NOT relayed to:
<*****@free.fr>:
550 5.7.1 Rejected, id=05840-02 - BAD_HEADER: Non-encoded 8-bit data
(char E9 hex): Subject: Vous avez \351t\351 ajout\351 \340 un ...

This nondelivery report was generated by the program amavisd-new at host
soez.be. Our internal reference code for your message is
05840-02/UxJkekEj7FDg

INVALID HEADER: INVALID 8-BIT CHARACTERS IN HEADER

Non-encoded 8-bit data (char E9 hex): Subject: Vous avez \351t\351
ajout\351
\340 un ...

Return-Path: <web(at)****.be>
Message-ID: <d69acce154c14de9ef0c8df5db3279dc@*****>
Subject: Vous avez été ajouté à un groupe

WHAT IS AN INVALID CHARACTER IN MAIL HEADER?

The RFC 2822 standard specifies rules for forming internet messages.
It does not allow the use of characters with codes above 127 to be
used directly (non-encoded) in mail header.

If such characters (e.g. with diacritics) from ISO Latin or other
alphabets need to be included in the header, these characters need
to be properly encoded according to RFC 2047. This encoding is often
done transparently by mail reader (MUA), but if automatic encoding is
not available (e.g. by some older MUA) it is the user's responsibility
to avoid the use of such characters in mail header, or to encode them
manually. Typically the offending header fields in this category are
'Subject', 'Organization', and comment fields in e-mail addresses of
the 'From', 'To' and 'Cc'.

Sometimes such invalid header fields are inserted automatically
by some MUA, MTA, content checker, or other mail handling service.
If this is the case, that service needs to be fixed or properly
configured. Typically the offending header fields in this category
are 'Date', 'Received', 'X-Mailer', 'X-Priority', 'X-Scanned', etc.

If you don't know how to fix or avoid the problem, please report it
to _your_ postmaster or system manager.
dsn_status
Delivery error report

header
Message headers
Return-Path: <web(at)***be>
Received: by mail.soez.be (Postfix, from userid 48)
id 778D349DBD4; Sat, 3 Jun 2006 23:02:28 +0200 (CEST)
To: ***@free.fr
Subject: Vous avez &#1609;t&#1609; ajout&#1609; &#1600; un groupe
Reply-to: ***@hotmail.com
From: ***@hotmail.com
Message-ID: <d69acce154c14de9ef0c8df5db3279dc@*******>
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8bit
Date: Sat, 03 Jun 2006 23:02:28 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: PHP
X-MimeOLE: Produced By phpBB2
___________________________________________________________________

Thanks for your reply...

And sorry if the question was already answered :-(

_________________________________________________________________
Retrouvez vos dossiers de partage où que vous soyez grâce à la nouvelle
version de Messenger!
http://imagine-msn.com/minisites/messenger/default.aspx?locale=fr-be



_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Jim Knuth
2006-06-03 22:15:05 UTC
Permalink
Gestern (03.06.2006/23:48 Uhr) schrieb Num ber,
Post by Num ber
Hello and good evening everybody ..
I have a error message when Phpbb send a mail ..
But i don't know why ? could you help me ?
Phpbb send some mail correctly with a php script...
_______________________________________________________
550 5.7.1 Rejected, id=05840-02 - BAD_HEADER: Non-encoded 8-bit data
(char E9 hex): Subject: Vous avez \351t\351 ajout\351 \340 un ...
This nondelivery report was generated by the program amavisd-new at host
soez.be. Our internal reference code for your message is
05840-02/UxJkekEj7FDg
INVALID HEADER: INVALID 8-BIT CHARACTERS IN HEADER
turn off header_checks in amavisd.conf

@bypass_header_checks_maps = (1);
--
Viele Gruesse, Kind regards,
Jim Knuth
***@jkart.de
ICQ #277289867
----------
Zufalls-Zitat
----------
Stärke des Characters ist oft nichts anderes als Schwäche
des Gefühls. (Arthur Schnitzler)
----------
Der Text hat nichts mit dem Empfaenger der Mail zu tun
----------
Virus free. Checked by NOD32 Version 1.1576 Build 7396 02.06.2006



_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Num ber
2006-06-04 10:01:35 UTC
Permalink
Thanks for your reply !!
Post by Jim Knuth
turn off header_checks in amavisd.conf
@bypass_header_checks_maps = (1);
Yes i know i can do that .. But if i can resolve the problem it's better ...
Everyone can install phpbb on my serveur, and i don't want to say every time
'fix Phpbb' because Phpbb work fine on other network..

The solution it's a little to hard for me ..
header_checks it's a good solution for blocking some malicious mail
Post by Jim Knuth
Fix your phpbb script.
RFC's prohibit 8 bit unencoded characters in the headers.
Just like it says.
The full explanation of what went wrong, and the relevent RFC referecnes
are below in the email you sent.
Thanks for your reply ...
I know i can do that.. But Phpbb only use the mail fonction..

I don't understand why i have this error ...
What part of the message wasn't encoding ?
How can i change this for every script on php/phpbb or amavisd ??

Many thanks for your help

_______________________________________
Return-Path: <web @ *****.be>
Received: by *****.be (Postfix, from userid 48)
id A4A1A49DC35; Sun, 4 Jun 2006 11:12:36 +0200 (CEST)
To: *********@hotmail.com
Subject: Un nouveau message priv&#1609; vient d'arriver
Reply-to: ***@hotmail.com
From: ***@hotmail.com
Message-ID: <***@vf.number.ath.cx>
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8bit
Date: Sun, 04 Jun 2006 11:12:36 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: PHP
X-MimeOLE: Produced By phpBB2
______________________________________

Thanks

_________________________________________________________________
Retrouvez vos dossiers de partage où que vous soyez grâce à la nouvelle
version de Messenger!
http://imagine-msn.com/minisites/messenger/default.aspx?locale=fr-be



_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Num ber
2006-06-04 10:34:55 UTC
Permalink
I have a screenshoot.. with the error message.

Loading Image...

You can see the error message, the caractère and the mail..
Post by Num ber
Thanks for your reply !!
Post by Jim Knuth
turn off header_checks in amavisd.conf
@bypass_header_checks_maps = (1);
Yes i know i can do that .. But if i can resolve the problem it's better ...
Everyone can install phpbb on my serveur, and i don't want to say every time
'fix Phpbb' because Phpbb work fine on other network..
The solution it's a little to hard for me ..
header_checks it's a good solution for blocking some malicious mail
Post by Jim Knuth
Fix your phpbb script.
RFC's prohibit 8 bit unencoded characters in the headers.
Just like it says.
The full explanation of what went wrong, and the relevent RFC referecnes
are below in the email you sent.
Thanks for your reply ...
I know i can do that.. But Phpbb only use the mail fonction..
I don't understand why i have this error ...
What part of the message wasn't encoding ?
How can i change this for every script on php/phpbb or amavisd ??
Many thanks for your help
_______________________________________
Received: by *****.be (Postfix, from userid 48)
id A4A1A49DC35; Sun, 4 Jun 2006 11:12:36 +0200 (CEST)
Subject: Un nouveau message priv&#1609; vient d'arriver
MIME-Version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8bit
Date: Sun, 04 Jun 2006 11:12:36 +0200
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: PHP
X-MimeOLE: Produced By phpBB2
______________________________________
Thanks
_________________________________________________________________
Vous vous sentez seul au monde? Elargissez votre horizon grâce au bouton
Messenger . http://www.fr.msn.be/messengerbutton



_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Nicolas Riendeau
2006-06-04 14:40:06 UTC
Permalink
Hi!
Post by Num ber
I don't understand why i have this error ...
What part of the message wasn't encoding ?
There is an accent in the subject line (in the word "privé"). If you look at the
subject lines produced by Amavis you'll see that the accents have been replaced by a
combination of multiple characters (they have been "escaped"/encoded).

However they weren't not encoded that way when the message was sent, there was a
character which value was above 127.

Encoded using RFC 2047 the following subject line

Un nouveau message privé vient d'arriver

could be encoded

=?ISO-8859-1?Q?Un_nouveau_message_priv=E9_vient_d'arriver?=

or

Un nouveau message =?ISO-8859-1?Q?priv=E9_vient_d=27arriver?=

etc... (There's actually more than one way to encode the same thing, these are just
two of the possible ones... The second way to encode it is the one produced by Mozila
under certain circumstances but if I remember the results of some tests I did in the
past well, the way it encodes depends on what it has to encode...).
Post by Num ber
How can i change this for every script on php/phpbb or amavisd ??
The place where this should be corrected would be phpbb but I unfortunatly don't know
how to do it...

Have a nice day!

Nick



_______________________________________________
AMaViS-user mailing list
AMaViS-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Loading...