Missing multiple RFC support (MAIL FROM + RCPT TO)
- Dominant language
- Python
- Stars
- 373
- Forks
- 105
- Avg merge
- 4m
- Merged PRs (30d)
- 2
Description
I'm using this diff in my local smtp server which works as a proxy for the postfix. The aiosmtpd does not understand some parameters for MAIL FROM and RCPT TO:
```
diff --git a/aiosmtpd/smtp.py b/aiosmtpd/smtp.py
index a977f75..300bfee 100644
--- a/aiosmtpd/smtp.py
+++ b/aiosmtpd/smtp.py
@@ -1281,6 +1281,9 @@ class SMTP(asyncio.StreamReaderProtocol):
'552 Error: message size exceeds fixed maximum message '
'size')
return
+ envid = params.pop('ENVID', None) # RFC 3885
+ auth = params.pop('AUTH', None) # RFC 4954
+ ret = params.pop('RET', None) # RFC 3461
if len(params) > 0:
await self.push(
'555 MAIL FROM parameters not recognized or not implemented')
@@ -1322,6 +1325,8 @@ class SMTP(asyncio.StreamReaderProtocol):
if params is None:
return await self.push(syntaxerr)
# XXX currently there are no options we recognize.
+ orcpt = params.pop("ORCPT", None) # RFC 1891
+ notify = params.pop("NOTIFY", None) # RFC 3461
if len(params) > 0:
return await self.push(
'555 RCPT TO parameters not recognized or not implemented'
```
It would be nice, if someone can add those extensions. Also, it may be nice to have a list of parameters to be skipped in the SMTP class, so users can add the extra parameters to the class (using own class or assignments) without the need to modify directly the base class.
EDIT: v2 - added NOTIFY parameter
Contributor guide
Assessment
This issue has not been assessed yet.