Hello list,

I have installed BackupPC some months ago, and I have noticed that the
users never receive email notifications of problems.

I have found where the problem comes from.

My installation of BackupPC is configured to use the french language :
$Conf{Language} = 'fr';
When BackupPC wants to send an email, the subject is in french language
and may contain non-ASCII characters. For example :
BackupPC: aucune sauvegarde récente de michel
or :
BackupPC: aucune sauvegarde de sabrina n\'a réussi

The RFC 2822 forbids the inclusion of non-ASCII characters in any e-mail
header, including the subject.

The email server of my company is configured to reject incorrect
e-mails, and it sends an error message to the sender :


**********************************************************************************
The message WAS NOT relayed to:
   <[EMAIL PROTECTED]>:
    550 5.7.1 Rejected, id=21324-16 - BAD_HEADER: Non-encoded 8-bit data
(char E9 hex): Subject: BackupPC: aucune sauvegarde de sabrina n'...

This nondelivery report was generated by the program amavisd-new at host
gelas.mxm. Our internal reference code for your message is
21324-16/Z98U+nKks6E8

INVALID HEADER: INVALID 8-BIT CHARACTERS IN HEADER

   Non-encoded 8-bit data (char E9 hex): Subject: BackupPC: aucune
sauvegarde de sabrina n'a r\351ussi\n

Return-Path: <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Subject: BackupPC: aucune sauvegarde de sabrina n'a réussi

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'.

Reporting-MTA: dns; gelas.mxm
Received-From-MTA: smtp; gelas.mail.mxm ([127.0.0.1])
Arrival-Date: Thu, 21 Feb 2008 01:29:36 +0100 (CET)

Original-Recipient: rfc822;[EMAIL PROTECTED]
Final-Recipient: rfc822;[EMAIL PROTECTED]
Action: failed
Status: 5.7.1
Diagnostic-Code: smtp; 550-5.7.1 Rejected, id=21324-16 - BAD_HEADER:
  550-5.7.1 Non-encoded 8-bit data (char E9 hex): Subject: BackupPC: aucune
  550 5.7.1 sauvegarde de sabrina n'...
Last-Attempt-Date: Thu, 21 Feb 2008 01:29:38 +0100 (CET)

Return-Path: <[EMAIL PROTECTED]>
Received: from clapier (backup.mxm [192.168.0.229])
        by gelas.mail.mxm (Postfix) with SMTP id E6C8C227960
        for <[EMAIL PROTECTED]>; Thu, 21 Feb 2008 01:29:35 +0100 (CET)
Received: by clapier (sSMTP sendmail emulation); Thu, 21 Feb 2008
01:29:33 +0100
From: "added by portage for backuppc" <[EMAIL PROTECTED]>
Date: Thu, 21 Feb 2008 01:29:33 +0100
To: [EMAIL PROTECTED]
cc:
Subject: BackupPC: aucune sauvegarde de sabrina n'a réussi
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Message-Id: <[EMAIL PROTECTED]>

**********************************************************************************


I have looked at BackupPC source code, and found that the headers are
not encoded.

Solution :
The subroutine sendUserEmail in the file BackupPC_sendEmail should
encode the headers of the message according to RFC 2047.

I am not a Perl programmer, so I can't patch the source code myself. By
I am sure that such an encoding function exists in the Perl libraries.

If somebody can provide a patch, I'll be happy to test it.

Thanks,
Jean-Claude



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
[email protected]
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to