|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
[patch] report actual message size in smtpd message
From: Michael Tokarev (mjt
tls.msk.ru)
Date: Wed Jul 26 2006 - 07:07:57 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The following patch (attached) changes smtpd to always
report actual message size if it exceed the limit (as
checked either by cleanup or by smtpd itself).
Currently postfix goes by this:
552 5.3.4 Error: message file too big
With the change, it acts like this (example):
552 5.3.4 Error: message file too big (12914086 bytes)
The patch changes state->act_size calculation to be
pefrormed always, regardless of error conditions
(adding length of the current line to state->act_size).
One possible issue with this is that when someone will
try to send huge amount of data, state->act_size may
overflow, but the only possible consequence is the
misleading error message. Ofcourse it's possible to
check for overflow and in case it's found, print
something like "(>xxx bytes)", but I don't think
it's worth the trouble.
Also, it's possible to output actual message size
limit on the same message, but since the limits
may be different for cleanup and smtpd, I don't
think it's a good idea, especially since smtpd
already prints out the SIZE=xxx line to the
EHLO command.
And around this, I've a question.
Currently, there are several cases which aren't
logged by smtpd, including this "message is too
big" (btw, shouldn't it be "message file IS too
big", with the "is" part?). Should it log this
and similar conditions? I think it should, but
I don't quite sure where to do so, and for which
conditions, too.
Thanks.
/mjt
- text/x-patch attachment: postfix-2.3.0-smtpd-report-msgsize.diff
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]