On Tue, Jun 24, 2014 at 10:58 AM, Wietse Venema <wie...@porcupine.org> wrote:
> Mauricio Tavares:
>>       This email is mostly about understanding what is going on, how
>> the process works than whether my install of postfix is working
>> properly or the MUA is lying. In fact, I am using ssmtp to send the
>> email to postfix because I want to make my test as simple as possible
>> (avoid "helpful" MUAs adding stuff to the email). So, let's say I
>> create simple email:
>>
>> raub@desktop:~$ cat 8bit_test
>> Subject: 8bit test
>> Content-Transfer-Encoding: 8bit
>>
>> Text with umlauts here
>
> This email requires a MIME-Version header. Otherwise it is
> not valid MIME.
>
      Thanks for the info. I then added MIME-Version:

raub@desktop:~$ cat 8bit_test
Subject: 8bit test
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Italienisches Olivenöl

raub@desktop:~$

and tried again using ssmtp. It still fails.

>>
>> It only has two headers (the From: header is added when I actually
>> send email) and a single line in the body, which has a few 8bit
>> characters. I am using ssmtp to send the above email to my postfix
>> server,
>>
>> ssmtp -v r...@domain.com < 8bit_test
>>
>> which is setup to do DKIM and announces that supports the following
>>
>> 250-PIPELINING
>> 250-SIZE
>> 250-ETRN
>> 250-STARTTLS
>> 250-ENHANCEDSTATUSCODES
>> 250-8BITMIME
>> 250 DSN
>
> If the client sends 8BITMIME, then it MUST issue the 8BITMIME keyword
> on the MAIL FROM command line. Otherwise, behavior is undefined
> (i.e. different systems may handle this in different ways).

       Let me use an example to see if I understand what you are
saying: here is the transaction when I sent that email using ssmtp
(which is talking to mail.domain.com, which is using postfix):

 ssmtp -v r...@domain.com < 8bit_test.bare
[<-] 220 mail.domain.com Test Mail Server
[->] HELO raub.internal.domain.com
[<-] 250 mail.domain.com
[->] MAIL FROM:<r...@desktop.internal.domain.com>
[<-] 250 2.1.0 Ok
[->] RCPT TO:<r...@domain.com>
[<-] 250 2.1.5 Ok
[->] DATA
[<-] 354 End data with <CR><LF>.<CR><LF>
[->] Received: by desktop.internal.domain.com (sSMTP sendmail
emulation); Tue, 24 Jun 2014 17:05:06 -0400
[->] From: "Mauricio Tavares" <r...@desktop.internal.domain.com>
[->] Date: Tue, 24 Jun 2014 17:05:06 -0400
[->] Subject: 8bit test - bare
[->] MIME-Version: 1.0
[->] Content-Transfer-Encoding: 8bit
[->] Content-Type: text/plain; charset=ISO-8859-1; format=flowed
[->]
[->] Italienisches Oliven�l
[->]
[->] Same text
[->]
[->] .
[<-] 250 2.0.0 Ok: queued as CC9FE80042
[->] QUIT
[<-] 221 2.0.0 Bye

the proper MAIL FROM command line should be
(http://tools.ietf.org/html/rfc6152):

MAIL FROM:<r...@desktop.internal.domain.com> BODY=8BITMIME

If that is the case, I think that explains issues I observed with a
few email clients, notably thunderbird. Instead of posting the problem
I saw, I thought it would make sense for me to understand how this is
supposed to work first. Now I can rerun thunderbird in debug mode and
see if it is sending a proper MAIL FROM command line stating to use
8BITMIME.

>
>> What I have noticed is that it will fail DKIM, and then will change
>> the Content-Transfer-Encoding: header to quoted-printable. Now, if I
>
> As required by the MIME RFCs, an MTA must either bounce mail or
> convert it to quoted-printable when it needs to deliver 8BITMIME
> mail to an SMTP server that does not announce 8BITMIME support.
>
> DKIM signatures of 8BITMIME mail may break unless all SMTP servers
> in the path implement and announce 8BITMIME support. Otherwise, it
> is better to down-convert to quoted-printable before DKIM signing.
>
      Can I down-convert the email in postfix before DKIM signing? I
believe some email clients using this server are sending 8BITMIME
emails without a properly created MAIL FROM command line. Since I
cannot do the right thing and correct that at the MUA side, I would
like to do the next best thing.

>         Wietse

Reply via email to