This behavior does not seem right to me:
parsing 'merwok'
expected ('merwok', '')
got ('', 'merwok')
parsing 'merwok wok@rusty'
expected ('', 'wok@rusty')
got ('', 'merwokwok@rusty')
(Generated with a small script just doing a loop and prints, not attached because boring.)
Are my expectations wrong? I don’t know if a string like “merwok” in my first example is a legal address in the relevant RFCs; Mark Sapiro replied in msg110556 that it could be consistent with most MUAs/MTAs.
I don’t know either if the folding done in the second example is okay; I’d like an exception here, or if parseaddr is designed to never fail, empty strings to indicate failure. I’m also okay with “garbage in, garbage out” as answer. |