Hi Rian,

Before I started converting my other modules to the new code I figured I would start with writing a new module to handle the SIZE extension. I needed to apply the following patch (link below) to the mod_smtpd code to get access at the max data size.

I hooked the mail from hook, check for a valid SIZE in mail_parameters and check to make sure it is not over the limit. If it is over the limit I can use smtpd_respond_oneline to send the 552 "message exceeds fixed maximum message size" line back to the client, but what should the function return to make it force a QUIT or REST command as anything but SMTPD_DONE sends more stuff to the client.

Should I just return SMTPD_DONE and set scr->should_disconnect? Could we tweak it to support two different settings, one would only allow QUIT only and the other would allow QUIT and REST (to start over).

Thanks,

Brian

http://www.brianfrance.com/software/apache/size.diff




Reply via email to