Open derelbenkoenig opened 6 years ago
Give a look here : https://github.com/davidmoten/subethasmtp/commit/5c2388746518afc1ca19064d1f0f1115e6ffa1ce. Maybe you should think to switch to the new fork by @davidmoten
That's an interesting idea but I don't think it addresses my particular concern; it looks like in that fork, the TooMuchDataException
is still treated as an IOException
which returns with the SMTP error code of 421, while I was suggesting 452 or 552 for too much data.
It looks like there is no
catch
block for theTooMuchDataException
specifically, so it will be caught in the generalIOException
catch inSession.java
, which returns"421 4.4.0 Problem attempting to execute commands. Please try again later."
I believe this exception should translate either to
552 Requested mail action aborted: exceeded storage allocation
or452 Requested action not taken: insufficient system storage
Either that, or the Exception should simply be removed from the method signature. It is redundant as the method declares that it throws
IOException
anyway, and the implementation will need to throw aRejectException
anyway if they want to have control over what error code is returned