The 'mail' command is not encoding the user name correctly

Bug #27121 reported by Carlos Perelló Marín
4
Affects Status Importance Assigned to Milestone
mailx (Debian)
Won't Fix
Unknown
mailx (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

My Linux user entry at /etc/password is: 'Carlos Perelló Marín' using UTF-8
characters.

Every time I sent an email using the 'mail' command, it sets the From: header
with a bad encoding getting this error message from spam filters:

X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char C3 hex) in message
header 'From'

After talking about the issue at #launchpad channel, Stuart talked about several
causes for this bug:

stub carlos: Either the user database is ASCII only, in which case you shouldn't
have been allowed to set that name, or the user database is in some other known
encoding, in which case 'mail' should encode the From: header correctly. Or the
user database is in an arbitrary, unknown encoding which would also be a bug.

Revision history for this message
In , Robert Luberda (robert-debian) wrote : merging

merge 282534 207724
thanks

Revision history for this message
Carlos Perelló Marín (carlos) wrote :

My Linux user entry at /etc/password is: 'Carlos Perelló Marín' using UTF-8
characters.

Every time I sent an email using the 'mail' command, it sets the From: header
with a bad encoding getting this error message from spam filters:

X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char C3 hex) in message
header 'From'

After talking about the issue at #launchpad channel, Stuart talked about several
causes for this bug:

stub carlos: Either the user database is ASCII only, in which case you shouldn't
have been allowed to set that name, or the user database is in some other known
encoding, in which case 'mail' should encode the From: header correctly. Or the
user database is in an arbitrary, unknown encoding which would also be a bug.

Matt Zimmerman (mdz)
Changed in mailx:
assignee: nobody → ijackson
Revision history for this message
In , David =?iso-8859-1?Q?H=E4rdeman?= (david-2gen) wrote : severity of 364809 is wishlist, merging 364809 207724

# Automatically generated email from bts, devscripts version 2.9.19
severity 364809 wishlist
merge 364809 207724

Changed in mailx:
status: Unknown → Unconfirmed
Ian Jackson (ijackson)
Changed in mailx:
assignee: ijackson → nobody
Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 or 9.04?

Changed in mailx:
status: New → Incomplete
Revision history for this message
Carlos Perelló Marín (carlos) wrote :

It still happens with Ubuntu 8.10

Changed in mailx:
status: Incomplete → Confirmed
Revision history for this message
Martin-Éric Racine (q-funk) wrote :

It still happens in Jaunty.

Revision history for this message
In , Martin-Éric Racine (q-funk) wrote : Re: please encode headers according to RFC2047

Package: bsd-mailx
Version: 8.1.2-0.20081101cvs-2
Severity: normal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Come on! This bug has been open since 2003.

Meanwhile, practically everything in Debian has migrated to either using UTF-8
by default or acquired abilties to detect character-set and set MIME headers.

It so happens that several Release Goals in Debian relate to UTF-8 adoption.
Most of those goals were already achieved in previous Debian releases.

As such, this broken mailx implementation has become completely unacceptable.

Fixing it would require parsing LC_CTYPE and using the character-set it returns
to build the MIME headers used to produce the e-mail message.

- -- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-020630-generic (SMP w/1 CPU core)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bsd-mailx depends on:
ii base-files 5.0.0 Debian base system miscellaneous f
ii libc6 2.9-23 GNU C Library: Shared libraries
ii liblockfile1 1.08-3 NFS-safe locking library, includes
ii nullmailer [mail-transport-ag 1:1.04-1.1 simple relay-only mail transport a

bsd-mailx recommends no packages.

bsd-mailx suggests no packages.

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqdHpIACgkQeXr56x4Muc31DgCgjkjiBxMrFlA5AVOxO/WPJXoP
wvgAn3jX6oEbEd5thO/ZxXrEIhc/DI1b
=8FaF
-----END PGP SIGNATURE-----

Revision history for this message
In , Robert Luberda (robert-debian) wrote : reassigning to bsd-mailx

# dropping mailx package, reassigning all its bugs to bsd-mailx
package mailx
reassign 68934 bsd-mailx
reassign 85953 bsd-mailx
reassign 148071 bsd-mailx
reassign 162333 bsd-mailx
reassign 181024 bsd-mailx
reassign 197273 bsd-mailx
reassign 197418 bsd-mailx
reassign 198167 bsd-mailx
reassign 207724 bsd-mailx
reassign 224530 bsd-mailx
reassign 286414 bsd-mailx
reassign 324981 bsd-mailx
reassign 327809 bsd-mailx
reassign 349701 bsd-mailx
thanks

Revision history for this message
In , Don Armstrong (don-debian) wrote : Re: Bug#546248: Bogus complains: `Failed to clear fixed versions and reopen.... limit failed...'

reasssign 546284 debbugs
retitle 546284 ignore limits on internal requests in Debbugs::Control
severity 546284 minor
tag 546284 confirmed
limit package bsd-mailx mailx
reassign 68934 mailx
reassign 85953 mailx
reassign 148071 mailx
reassign 162333 mailx
reassign 181024 mailx
reassign 197273 mailx
reassign 197418 mailx
reassign 198167 mailx
reassign 207724 mailx
reassign 224530 mailx
reassign 286414 mailx
reassign 324981 mailx
reassign 327809 mailx
reassign 349701 mailx
reassign 68934 bsd-mailx
reassign 85953 bsd-mailx
reassign 148071 bsd-mailx
reassign 162333 bsd-mailx
reassign 181024 bsd-mailx
reassign 197273 bsd-mailx
reassign 197418 bsd-mailx
reassign 198167 bsd-mailx
reassign 207724 bsd-mailx
reassign 224530 bsd-mailx
reassign 286414 bsd-mailx
reassign 324981 bsd-mailx
reassign 327809 bsd-mailx
reassign 349701 bsd-mailx
thanks

On Fri, 11 Sep 2009, Robert Luberda wrote:
> I was reassigning all the mailx bugs to bsd-mailx, and got a response
> with a bunch of strange complains `Failed to clear fixed versions and
> reopen on XXXXX: limit failed for bugs: XXXXXX'. I have no idea what
> does it mean; it seems all of the reassign commands worked OK.

When doing a reassign, you currently need to also limit to the
packages that you're reassigning to. I'm thinking though, that this
should probably be changed to ignore the limit for internal requests
like the reopen/notfixed. Reassigned and retitled appropriately.

> > # dropping mailx package, reassigning all its bugs to bsd-mailx
> > package mailx

If you had set package mailx bsd-mailx; this would have worked properly.

> Limiting to bugs with field 'package' containing at least one of 'mailx'
> Limit currently set to 'package':'mailx'
>
> > reassign 68934 bsd-mailx
> Bug #68934 [mailx] save command and deletion of messages
> Bug reassigned from package 'mailx' to 'bsd-mailx'.

at this point, 68934 is no longer in the mailx package, but since
it's been reassigned, the fixed versions should be cleared, and the
package should be reopened.

Don Armstrong

--
Cheop's Law: Nothing ever gets built on schedule or within budget.
 -- Robert Heinlein _Time Enough For Love_ p242

http://www.donarmstrong.com http://rzlab.ucr.edu

Revision history for this message
Dave Walker (davewalker) wrote :

Attempting to set my name as the test case, I found that I could not reproduce it with package bsd-mailx 8.1.2-0.20100314cvs-1 (Natty, current development version).

Therefore, It seems to have been resolved - however not sure when.

Changed in mailx (Ubuntu):
status: Confirmed → Fix Released
Changed in mailx (Debian):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.