#364809 mailx: mail sends 8bit characters in headers - was: bts sends 8bit characters in headers

Package:
bsd-mailx
Source:
bsd-mailx
Description:
simple mail user agent
Submitter:
David Härdeman
Date:
2024-06-16 00:30:03 UTC
Severity:
wishlist
Tags:
#364809#3
Date:
2006-04-25 20:12:45 UTC
From:
To:
Bug #339657 fixed the problem where bts wouldn't properly escape 8bit
characters in DEBFULLNAME. But if DEBFULLNAME isn't set, the full name
is taken from /etc/passwd and used without escaping it first, causing
the same problems as in #339657.

Re,
David

#364809#8
Date:
2006-04-26 05:46:00 UTC
From:
To:
Oh.  I don't know how to solve this one.

The full name is taken from DEBFULLNAME or EMAIL, and if neither of
these are set, then from getpwuid.  If `locale charmap` returns
anything, the charset is taken from that setting and is used to encode
the name for MIME purposes.

This bug arises in the following situation:

  DEBFULLNAME is not set, and
  EMAIL is either unset or does not contain the name, and
  getpwuid (reading /etc/passwd or some other source) returns a name
    using an 8-bit encoding, and
  the locale does not match the encoding of /etc/passwd or whatever

How should I determine the correct encoding to use in this situation?
Or would it be better not to use the name at all in such a situation?

The latter might be best.

   Julian

#364809#13
Date:
2006-04-26 18:44:08 UTC
From:
To:
I agree partially...

DEBFULLNAME was not set
EMAIL was not set
getpwuid returned my name using an 8-bit encoding (UTF-8)

...but...

the locale does match the encoding of /etc/passwd...locale charmap
returns "UTF-8".

So there seems to be something missing here.

An alternative fix would be to verify before sending any mails that
the From header does indeed not contain any 8-bit characters and warn if
it does.

Re,
David

#364809#18
Date:
2006-04-26 21:17:55 UTC
From:
To:
That's just plain weird.  How on earth could that happen?

Agreed.

   Julian

#364809#23
Date:
2006-04-27 20:29:47 UTC
From:
To:
Looking at a message where it failed, the relevant header says:
From: david@2gen.com (David Härdeman)

and a message which didn't fail (with DEBFULLNAME and DEBEMAIL set):
From david@2gen.com Tue Apr 25 13:01:37 2006
...
From: David =?UTF-8?Q?H=C3=A4rdeman?= <david@2gen.com>


Re,
David

#364809#30
Date:
2006-04-27 21:16:49 UTC
From:
To:
Ah, that's it!!  Misread the bts code.

The bug is not in bts at all, it's in mail (presumably /usr/bin/mail),
which is called if neither DEBEMAIL nor EMAIL are set.  So whichever
package you have which provides the mail executable is the one which
is sending unencoded 8-bit names.

Please could you reassign this bug to that package?

Thanks,

   Julian

#364809#35
Date:
2006-04-27 21:33:28 UTC
From:
To:
Ok, I've just reassigned the bug report to mailx, and I'll merge it with
207724.

Thanks for the help.

Regards,
David

#364809#70
Date:
2024-06-12 09:41:25 UTC
From:
To:
Hallo;) Mister Absolute;)
Im a unmarried hot lady and seeking tidy male)
I can send to You my photo;) Response to me tretyakovaleila1993@outlook.com Bye Darya!

#364809#75
Date:
2024-06-15 12:16:23 UTC
From:
To:
Welcome;) mister Honorable. My Name is Darya;) I am a single openhearted woman;) Now I'm trying to find beatific dude) I'm going to reply to You my photos;)
Reply me at tretyakovaleila1993@outlook.com
Have a good day
Darya.