Jared Johnson wrote:
it occurs to me that the most appropriate thing would be to drop a connection and stop listening when we have received what we consider to be too much data after the DATA command.
That would be a major violation of the applicable RFC, and as such I don't think it would be appropriate to add to the core product. You are welcome to hack your own copy however.
In the past, I've noticed that this problem with large messages was due to timeouts after DATA and before the final 220 reception response, causing the remote MTA to timeout (and then retry again and again). This could happen because a virus or other content scanner is taking too long, or if you are relaying the messages to some other server over a slow link.
Create a new config/databytes file with the largest message size you are willing to accept, and qpsmtpd will DTRT (see lib/Qpsmtpd/SMTP.pm line 719 or so for details)...
John