mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 12:28:06 +00:00
fix: ignore all RCPT TO: parameters
Stalwart sends `NOTIFY=DELAY,FAILURE` to request Delivery Status Notifications. aiosmtpd does not support any parameters, not just ORCPT, so we have to ignore all of them.
This commit is contained in:
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
## untagged
|
## untagged
|
||||||
|
|
||||||
|
- Ignore all RCPT TO: parameters
|
||||||
|
([#651](https://github.com/chatmail/relay/pull/651))
|
||||||
|
|
||||||
- Use max username length in newemail.py, not min
|
- Use max username length in newemail.py, not min
|
||||||
([#648](https://github.com/chatmail/relay/pull/648))
|
([#648](https://github.com/chatmail/relay/pull/648))
|
||||||
|
|
||||||
|
|||||||
@@ -197,11 +197,13 @@ class HackedController(Controller):
|
|||||||
|
|
||||||
class SMTPDiscardRCPTO_options(SMTP):
|
class SMTPDiscardRCPTO_options(SMTP):
|
||||||
def _getparams(self, params):
|
def _getparams(self, params):
|
||||||
# aiosmtpd's SMTP daemon fails to handle a request if there are RCPT TO options
|
# Ignore RCPT TO parameters.
|
||||||
# We just ignore them for our incoming filtermail purposes
|
#
|
||||||
if len(params) == 1 and params[0].startswith("ORCPT"):
|
# Otherwise parameters such as `ORCPT=...`
|
||||||
return {}
|
# or `NOTIFY=DELAY,FAILURE` (generated by Stalwart)
|
||||||
return super()._getparams(params)
|
# make aiosmtpd reject the message here:
|
||||||
|
# <https://github.com/aio-libs/aiosmtpd/blob/98f578389ae86e5345cc343fa4e5a17b21d9c96d/aiosmtpd/smtp.py#L1379-L1384>
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
class OutgoingBeforeQueueHandler:
|
class OutgoingBeforeQueueHandler:
|
||||||
|
|||||||
Reference in New Issue
Block a user