[exim-dev] Bug report: exim uses wrong locale when gecos-qua…

Góra strony
Delete this message
Reply to this message
Autor: Jan Christoph Nordholz
Data:  
Dla: exim-dev
Temat: [exim-dev] Bug report: exim uses wrong locale when gecos-qualifying sender address
Dear list,

when accepting mail in pure "local" mode (exim4 -bm) and when the
sender address is given unqualified in the mail header, exim4 tries to
qualify it with both the domain (which is fine) and the realname,
as read from the gecos field returned by getpwnam(). If this
gecos field contains 8-bit characters, exim escapes them using
the active locale (in my case, 'ä' => '=E4' with ISO8859-1 (or -15)),
but declares it to be UTF8, which is plain wrong:

] From thomasbl@??? Mon Jul 31 21:30:27 2006
] Return-path: <thomasbl@???>
] Envelope-to: hesso@???
] Delivery-date: Mon, 31 Jul 2006 21:30:27 +0200
] Received: from fb3-s4.math.tu-berlin.de ([130.149.11.5] ident=Debian-exim)
]         by fb3-s7.math.tu-berlin.de with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32)
]         (Exim 4.50)
]         id 1G7dT9-0007cl-5L
]         for hesso@???; Mon, 31 Jul 2006 21:30:27 +0200
] Received: from thomasbl by fb3-s4.math.tu-berlin.de with local (Exim 4.62)
]         (envelope-from <thomasbl@???>)
]         id 1G7dT9-00007w-1L
]         for hesso@???; Mon, 31 Jul 2006 21:30:27 +0200
] To: hesso@???
] Subject: ...
] Message-Id: <E1G7dT9-00007w-1L@???>
] From: =?UTF-8?Q?Thomas_Bl=E4sing?= <thomasbl@???>
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
] Date: Mon, 31 Jul 2006 21:30:27 +0200


The locale is en_US, but the problem seems to occur with any non-UTF-
locale (confirmed with en_IE, en_IE@euro, de_DE).

Bug reproduction guide:
* Create a user $user with 8-bit gecos field, and do the following:
$user@$host:~> exim4 -bm -- $user
From: $user
To: $user
Date: <rfc2822-date>
Subject: locale bug

foobar
^D
$user@$host:~> (observe $MAIL)

Other methods (local-esmtp, local-bsmtp) are not affected, because
gecos-qualification is not done there.

Sorry if this has been reported before, but I couldn't find any records of it
in the list's archives.


Regards,

Jan

PS: Please CC me in replies, I'm not on the list.

Reporting system:
* Debian Linux (2.6) running Exim 4.62
* Relevant configuration options:
qualify_domain = pool.math.tu-berlin.de
# linux-typical:
gecos_pattern = ^([^,:]*)
gecos_name = $1
All other *qualify*-options are unset.