Mailinglist Archive: opensuse (958 mails)

< Previous Next >
Re: [opensuse] mailx: how can I force the correct encoding of an attachment?
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Sun, 05 May 2019 11:24:07 +0200
  • Message-id: <qama3n$7tk$>
Per Jessen wrote:

Sending an email as attachment, type message/rfc822:

mailx -r <me@home> -a afile.eml reci@pient </dev/null

With an older mailx (Heirloom mailx 12.2 01/07/07), this is correctly
attached, encoded as 7bit.

With a newer mailx (Heirloom mailx 12.5 7/5/10), it is encoded as
base64, which cannot be read by most email agents. (Thunderbird can't
read it, mailparse doesn't parse it). According to rfc2045, it isn't
even permitted.

Does anyone know how to make mailx encode that attacment as 7bit, as
in the older mailx version?

I get to answer my own question - sort of -

The mailx version seems to be unrelated, the contents of /etc/mime.types
is what makes the difference:


produces correct encoding 7bit, although type text/plain.

message/rfc822 eml

produces wrong encoded base64, but type message/rfc822.

The correct encoding can be re-introduced by creating


(or by sending a file named "something.eml77" instead.

Other email agents such as Apple Mail, office365 and Outlook all do this

Per Jessen, Zürich (5.5°C) - your owncloud, hosted in Switzerland.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups