10

After updating postfix to 3.0, emails with UTF-8 chars in there subjects, are stuck in queue, with the following error:

SMTPUTF8 is required, but was not offered by host mail.example.com [1.2.3.4]

The receiving server (here called mail.example.com) are a postfix 2.10.1, and doesn't support SMTPUTF8

How do I get postfix to send those emails? Can I change some options in postfix, so it send it like it would have done before the update?

From my current options the interesting ones seem to be:

compatibility_level = 2
smtputf8_autodetect_classes = sendmail, verify
smtputf8_enable = ${{$compatibility_level} < {1} ? {no} : {yes}}
strict_smtputf8 = no

I think all of those settings are the default once in 3.0

2 Answers 2

5

According to Postfix README:

By default, Postfix sets the "SMTPUTF8 requested" flag only on address verification probes and on Postfix sendmail submissions that contain UTF-8 in the sender address, UTF-8 in a recipient address, or UTF-8 in a message header value.

If you submit mail through sendmail command or use address verification you may have to tweak smtputf8_autodetect_classes option.

To successfully flush the queue, after correcting smtputf8_autodetect_classes option, all mails have to be requeued with postsuper -r ALL command. Temporary disabling of smtputf8 feature may also be needed (see discussion in comments).

6
  • the queued emails come from apache/php, and I think its delivered to postfix by the sendmail command. I played a bit with smtputf8_autodetect_classes, but it dosn't seams to ffect the emails alredy in queue.
    – Puggan Se
    Apr 9, 2015 at 22:30
  • Maybe you could disable smtputf8 temporarily (smtputf8_enable = no) and flush the queue? Haven't tried this though.
    – baf
    Apr 9, 2015 at 22:41
  • have tested postconf -e smtputf8_enable=no, /etc/init.d/postfix restart, postqueue -f, but they still stays in the queue
    – Puggan Se
    Apr 9, 2015 at 22:51
  • Try to requeue the emails with postsuper -r (with smtputf8 disabled). Test first with single id, before you go with ALL.
    – baf
    Apr 10, 2015 at 6:19
  • 1
    Requeue with smtputf8_enable = no and smtputf8_autodetect_classes = bounce worked, the bounce should proberly be off or no, but just took a value other then sendmail to get it to work. Add the requeue info to you answer and il mark it as the correct answer.
    – Puggan Se
    Apr 10, 2015 at 6:57
1

I encountered this bug this morning.

  • When an email was sent with "php", I received :
X-Postfix; SMTPUTF8 is required, but was not offered by host
    mx-aol.mail.gm0.yahoodns.net[67.195.204.80]
  • When an email was sent to same adress with a proper mailer, the mail was received.

So instead of fixing "postfix", I fixed my php mail() command.

This is what worked for me, hope this helps someone.

                mail (  // $to =
                        $row["email"],
                        // $subject =
                        "Email subject here",
                        // $message =
                        quoted_printable_encode ("Bonjour,\r\n\r\nBlah blah - Sentiments distingués ... etc. "),

// $headers =
                        'From: ****@example.com' . "\r\n" .
                        'Reply-To: *******@example.com' . "\r\n" .
                        'Content-Type: text/plain; charset=UTF-8' . "\r\n" .
                        'Content-Transfer-Encoding: quoted-printable' . "\r\n" .  // <--- this is THE part.
                        'X-Mailer: PHP/example.com');

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .