Open qjebbs opened 4 months ago
What do you think is wrong?
The config:
remote_queue.bounce.deliver_to &outbound_delivery
leads to error
SMTPUTF8 is unsupported, cannot convert sender address
Background: I use Maddy as a side submission service, I want to deliver DSN to remote main service instead of local
Maddy
DSN
Change the default config file:
target.queue remote_queue { target &outbound_delivery autogenerated_msg_domain $(primary_domain) bounce { destination $(local_domains) { - deliver_to &local_routing + deliver_to &outbound_delivery } default_destination { reject 550 5.0.0 "Refusing to send DSNs to non-local addresses" } } }
Submit an email with invalid RCPT invalid@example.org to submission tls://0.0.0.0:465
invalid@example.org
submission tls://0.0.0.0:465
DSN delivery reports error
queue: delivery attempt failed {"msg_id":"74303153","rcpt":"invalid@example.org","reason":"Domain does not accept email (null MX)","smtp_code":556,"smtp_enchcode":"5.1.10","smtp_msg":"Domain does not accept email (null MX)"} queue: not delivered, permanent error {"msg_id":"74303153","rcpt":"invalid@example.org"} queue: generated failed DSN {"dsn_id":"44714bcf","msg_id":"74303153"} queue: failed to enqueue DSN {"dsn_id":"9ffc9be2","effective_rcpt":"xxx@xxxx.com","msg_id":"3a4d2026","reason":"address: missing at-sign","remote_server":"xxxx.com.","smtp_code":550,"smtp_enchcode":"5.6.7","smtp_msg":"SMTPUTF8 is unsupported, cannot convert sender address"}
Did some debugging:
dsnPipeline started with empty RCPT.
dsnPipeline
https://github.com/foxcpp/maddy/blob/1d6cd8c35f4c4a1279084ae974ecfcf73a426743/internal/target/queue/queue.go#L961
The error is caused by address.ToASCII(from) with from being empty:
address.ToASCII(from)
from
https://github.com/foxcpp/maddy/blob/1d6cd8c35f4c4a1279084ae974ecfcf73a426743/internal/smtpconn/smtpconn.go#L309-L327
The message is misleading, and the expected actions cannot be done.
Describe the bug
What do you think is wrong?
The config:
leads to error
Background: I use
Maddy
as a side submission service, I want to deliverDSN
to remote main service instead of localSteps to reproduce
Change the default config file:
Submit an email with invalid RCPT
invalid@example.org
tosubmission tls://0.0.0.0:465
DSN
delivery reports errorLog files
Environment information
Did some debugging:
dsnPipeline
started with empty RCPT.https://github.com/foxcpp/maddy/blob/1d6cd8c35f4c4a1279084ae974ecfcf73a426743/internal/target/queue/queue.go#L961
The error is caused by
address.ToASCII(from)
withfrom
being empty:https://github.com/foxcpp/maddy/blob/1d6cd8c35f4c4a1279084ae974ecfcf73a426743/internal/smtpconn/smtpconn.go#L309-L327
The message is misleading, and the expected actions cannot be done.