The __getaddr does not handle certain valid MAIL FROM well : For eg, <marcus@internetnow.com.my> SIZE=7777 AUTH=<> would result in a mismatch of bracket handling. Suggested fix is :- def __getaddr(self, keyword, arg): address = None keylen = len(keyword) if arg[:keylen].upper() == keyword: address = arg[keylen:].strip() if not address: pass # Marcus fix : i = address.count("<") ii = address.count(">") if i != ii : address = None return address # Marcus remark : bug if : <abc@ap.com.my> SIZE=6092 AUTH=<> elif address[0] == '<' and address[-1] == '>' and address ! = '<>': # Addresses can be in the form <person@dom.com> but watch out # for null address, e.g. <> if address.count("<") == 1 : address = address[1:-1] return address
I'm closing this as won't fix since smtpd.py is deprecated and will likely not get any future development. Please see aiosmtpd as a much better third party replacement.
History
Date
User
Action
Args
2022-04-11 14:56:38
admin
set
github: 48052
2018-01-10 00:56:50
barry
set
status: open -> closednosy: + barrymessages: + resolution: wont fixstage: test needed -> resolved