OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Is there a way to prevent large messages

From: Puthick Hok (hputhickgmail.com)
Date: Sat Feb 02 2008 - 04:26:31 CST


On Feb 1, 2008 6:09 PM, Alexey Lobanov <A.Lobanovcro-rct.ru> wrote:
> Hello.
>
> 01.02.2008 02:15, Puthick Hok пишет:
>
> > Hi,
> >
> > I have a postfix mail server running 2.1. Recently, there has been an
> > increasing number of incoming messages whose sizes are far larger than
> > the message_size_limit. Because the mail server does not know the size
> > of the message in advance, it has to receive it before rejecting it.
>
> Actually, an intelligent ESMTP client must stop large messages even
> before RCPT TO phase, in accordance with SIZE word in ESMTP server
> reply. An example:
>
> Jan 31 16:18:21 kiska postfix/smtp[23172]: 71F4D101C4: to=<*bti.co.ru>,
> relay=relay.bti.co.ru[195.68.151.228]:25, delay=10,
> delays=3.6/0.01/6.5/0, dsn=5.3.4, status=bounced (message size 8844538
> exceeds size limit 6291456 of
> server relay.bti.co.ru[195.68.151.228])
>
> 250-relay.bti.co.ru Hello [83.136.242.126]
> 250-TURN
> 250-ATRN
> 250-SIZE 6291456
>
> But it is obvious that your case the SMTP client is not intelligent.
>
> > Can postfix stop receiving the message once the size of message it has
> > received from the sending server is over the message_size_limit? Or
> > can postfix tell who the sending recipient is?
>
> I believe, yes. Just add the misbehaving client to "debug_peer_list" to
> log all SMTP commands.

debug_peer_list is the magic tool.

Puthick

>
> Alexey
>
>