when delivery fails due to missing 8bitmime/smtputf8 extensions, make it temporary failure

if you start delivering, openbsd's spamd will not announce 8bitmime support.
but once you get patched through to the actual mail server, it will likely
announce 8bitmime support.

perhaps we should also just attempt to deliver 8bit email without 8bitmime
extension. probably better for users than not even trying to send the message.
perhaps in a non-strict mode.
This commit is contained in:
Mechiel Lukkien 2023-02-17 21:58:05 +01:00
parent 4e5030ff38
commit a289a3e771
No known key found for this signature in database

View file

@ -583,11 +583,14 @@ func (c *Client) Deliver(ctx context.Context, mailFrom string, rcptTo string, ms
}
if !c.ext8bitmime && req8bitmime {
c.xerrorf(true, 0, "", "", "%w", Err8bitmimeUnsupported)
// Temporary error, e.g. OpenBSD spamd does not announce 8bitmime support, but once
// you get through, the mail server behind it probably does. Just needs a few
// retries.
c.xerrorf(false, 0, "", "", "%w", Err8bitmimeUnsupported)
}
if !c.extSMTPUTF8 && reqSMTPUTF8 {
// ../rfc/6531:313
c.xerrorf(true, 0, "", "", "%w", ErrSMTPUTF8Unsupported)
c.xerrorf(false, 0, "", "", "%w", ErrSMTPUTF8Unsupported)
}
if c.extSize && msgSize > c.maxSize {