mirror of
https://github.com/mjl-/mox.git
synced 2024-12-27 08:53:48 +03:00
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:
parent
4e5030ff38
commit
a289a3e771
1 changed files with 5 additions and 2 deletions
|
@ -583,11 +583,14 @@ func (c *Client) Deliver(ctx context.Context, mailFrom string, rcptTo string, ms
|
||||||
}
|
}
|
||||||
|
|
||||||
if !c.ext8bitmime && req8bitmime {
|
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 {
|
if !c.extSMTPUTF8 && reqSMTPUTF8 {
|
||||||
// ../rfc/6531:313
|
// ../rfc/6531:313
|
||||||
c.xerrorf(true, 0, "", "", "%w", ErrSMTPUTF8Unsupported)
|
c.xerrorf(false, 0, "", "", "%w", ErrSMTPUTF8Unsupported)
|
||||||
}
|
}
|
||||||
|
|
||||||
if c.extSize && msgSize > c.maxSize {
|
if c.extSize && msgSize > c.maxSize {
|
||||||
|
|
Loading…
Reference in a new issue