Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MaxMessageSize: reject immediately

6 views
Skip to first unread message

RICCARDO

unread,
Jul 4, 2008, 8:58:40 AM7/4/08
to
I set max size of messages to 5.1 MB ( define(`confMAX_MESSAGE_SIZE',
5100000 ) but I can see that message is rejected ONLY when data has
been copied to mail server, so when this happens I have unnecessary
network traffic. I'd like having broken connection as soon as client
communicates to server.
Is't possible that sendmail can know the mail size as soon as client
connects to server ?

Per Hedeland

unread,
Jul 4, 2008, 9:11:25 AM7/4/08
to
In article
<6a684c62-e204-44ce...@f63g2000hsf.googlegroups.com>

If the client (correctly) advertises the size on the MAIL command as
specified in the SIZE SMTP extension, sendmail will reject the message
at that point. If the client doesn't advertise it, sendmail has no
choice but to receive the whole thing (it doesn't write it to disk
though) - there is no provision in the SMTP protocol for aborting the
DATA phase mid-stream. (Closing the connection would be treated as a
connection problem and result in a retry by a correctly functioning SMTP
client.)

--Per Hedeland
p...@hedeland.org

RICCARDO

unread,
Jul 4, 2008, 9:30:39 AM7/4/08
to
On 4 Lug, 15:11, p...@hedeland.org (Per Hedeland) wrote:
> In article
> <6a684c62-e204-44ce-b225-29262265d...@f63g2000hsf.googlegroups.com>
>
> RICCARDO <castellani.ricca...@tiscali.it> writes:
> >I setmaxsizeof messages to 5.1 MB ( define(`confMAX_MESSAGE_SIZE',

> >5100000 ) but I can see that message is rejected ONLY when data has
> >been copied to mail server, so when this happens I have unnecessary
> >network traffic. I'd like having broken connection as soon as client
> >communicates to server.
> >Is't possible that sendmail can know the mailsizeas soon as client
> >connects to server ?
>
> If the client (correctly) advertises thesizeon the MAIL command as
> specified in theSIZESMTP extension, sendmail will reject the message

> at that point. If the client doesn't advertise it, sendmail has no
> choice but to receive the whole thing (it doesn't write it to disk
> though) - there is no provision in the SMTP protocol for aborting the
> DATA phase mid-stream. (Closing the connection would be treated as a
> connection problem and result in a retry by a correctly functioning SMTP
> client.)
>
> --Per Hedeland
> p...@hedeland.org

Do you know if Outlook Express and MS Outlook advertise msg size ?
If Yes, it's only necessary to set "confMAX_MESSAGE_SIZE" option in
sendmail.mc to reject msg ?

Andrzej Adam Filip

unread,
Jul 4, 2008, 9:55:58 AM7/4/08
to
p...@hedeland.org (Per Hedeland) wrote:

Per, would you keep your opinion even in case of "messages" with a few
Tera Bytes size? [ plain abuse/attack ]

AFAIR MTA may send in advance "next command reply" and break connection
but Per is right that many valid MTA will simply retry when it is
issued in middle of HUGE message body transmission.

So for non HUGE size abuses (over fast link) the best option is to reject
in reply to the final dot after message transmission.

--
[pl>en Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Live long and prosper.
-- Spock, "Amok Time", stardate 3372.7

RICCARDO

unread,
Jul 4, 2008, 10:09:39 AM7/4/08
to
On 4 Lug, 15:55, Andrzej Adam Filip <a...@onet.eu> wrote:
> p...@hedeland.org (Per Hedeland) wrote:
> > In article
> > <6a684c62-e204-44ce-b225-29262265d...@f63g2000hsf.googlegroups.com>
> > RICCARDO <castellani.ricca...@tiscali.it> writes:
> >>I setmaxsizeof messages to 5.1 MB ( define(`confMAX_MESSAGE_SIZE',

> >>5100000 ) but I can see that message is rejected ONLY when data has
> >>been copied to mail server, so when this happens I have unnecessary
> >>network traffic. I'd like having broken connection as soon as client
> >>communicates to server.
> >>Is't possible that sendmail can know the mailsizeas soon as client
> >>connects to server ?
>
> > If the client (correctly) advertises thesizeon the MAIL command as
> > specified in theSIZESMTP extension, sendmail will reject the message

> > at that point. If the client doesn't advertise it, sendmail has no
> > choice but to receive the whole thing (it doesn't write it to disk
> > though) - there is no provision in the SMTP protocol for aborting the
> > DATA phase mid-stream. (Closing the connection would be treated as a
> > connection problem and result in a retry by a correctly functioning SMTP
> > client.)
>
> > --Per Hedeland
> > p...@hedeland.org
>
> Per, would you keep your opinion even in case of "messages" with a few
> Tera Bytessize? [ plain abuse/attack ]

>
> AFAIR MTA may send in advance "next command reply" and break connection
> but Per is right that many valid MTA will simply retry when it is
> issued in middle of HUGE message body transmission.
>
> So for non HUGEsizeabuses (over fast link) the best option is to reject

> in reply to the final dot after message transmission.
>
> --
> [pl>en Andrew] Andrzej Adam Filip : a...@priv.onet.pl : a...@xl.wp.pl

> Live long and prosper.
> -- Spock, "Amok Time", stardate 3372.7

I'm agree with Andrzej Adam Filip, huge messages can glut my lan !
We can't wait message was finished to transmit before rejecting.

Per Hedeland

unread,
Jul 4, 2008, 10:07:56 AM7/4/08
to
In article
<f2eae90a-7259-46ec...@34g2000hsf.googlegroups.com>

RICCARDO <castellan...@tiscali.it> writes:
>On 4 Lug, 15:11, p...@hedeland.org (Per Hedeland) wrote:
>> In article
>> <6a684c62-e204-44ce-b225-29262265d...@f63g2000hsf.googlegroups.com>
>>
>> RICCARDO <castellani.ricca...@tiscali.it> writes:
>> >I setmaxsizeof messages to 5.1 MB ( define(`confMAX_MESSAGE_SIZE',
>> >5100000 ) but I can see that message is rejected ONLY when data has
>> >been copied to mail server, so when this happens I have unnecessary
>> >network traffic. I'd like having broken connection as soon as client
>> >communicates to server.
>> >Is't possible that sendmail can know the mailsizeas soon as client
>> >connects to server ?
>>
>> If the client (correctly) advertises thesizeon the MAIL command as
>> specified in theSIZESMTP extension, sendmail will reject the message
>> at that point. If the client doesn't advertise it, sendmail has no
>> choice but to receive the whole thing (it doesn't write it to disk
>> though) - there is no provision in the SMTP protocol for aborting the
>> DATA phase mid-stream. (Closing the connection would be treated as a
>> connection problem and result in a retry by a correctly functioning SMTP
>> client.)

>Do you know if Outlook Express and MS Outlook advertise msg size ?

I don't know, but I seriously doubt it. And in any case, it's not all
that common to care about bandwidth usage in a MUA<->MTA/MSA connection.

>If Yes, it's only necessary to set "confMAX_MESSAGE_SIZE" option in
>sendmail.mc to reject msg ?

Sendmail will reject the message if it is bigger than the specified size
regardless of how the client behaves - only that without SIZE
advertisement from the client, it can't be rejected until the body has
been received.

--Per Hedeland
p...@hedeland.org

Per Hedeland

unread,
Jul 4, 2008, 10:15:59 AM7/4/08
to
In article <p6ywh0kl...@anfi.office-on-the.net> Andrzej Adam Filip

<an...@onet.eu> writes:
>p...@hedeland.org (Per Hedeland) wrote:
>
>> In article
>> <6a684c62-e204-44ce...@f63g2000hsf.googlegroups.com>
>> RICCARDO <castellan...@tiscali.it> writes:
>>>I set max size of messages to 5.1 MB ( define(`confMAX_MESSAGE_SIZE',
>>>5100000 ) but I can see that message is rejected ONLY when data has
>>>been copied to mail server, so when this happens I have unnecessary
>>>network traffic. I'd like having broken connection as soon as client
>>>communicates to server.
>>>Is't possible that sendmail can know the mail size as soon as client
>>>connects to server ?
>>
>> If the client (correctly) advertises the size on the MAIL command as
>> specified in the SIZE SMTP extension, sendmail will reject the message
>> at that point. If the client doesn't advertise it, sendmail has no
>> choice but to receive the whole thing (it doesn't write it to disk
>> though) - there is no provision in the SMTP protocol for aborting the
>> DATA phase mid-stream. (Closing the connection would be treated as a
>> connection problem and result in a retry by a correctly functioning SMTP
>> client.)

>Per, would you keep your opinion even in case of "messages" with a few


>Tera Bytes size? [ plain abuse/attack ]

I didn't express any opinion, merely stated facts.

>AFAIR MTA may send in advance "next command reply" and break connection
>but Per is right that many valid MTA will simply retry when it is
>issued in middle of HUGE message body transmission.

That is what the protocol spec requires - there's no reason for a client
to look for replies while in the DATA phase, so it will just see a
failed write()/send() on the socket. Maybe some MTAs actually check for
and "obey" a reply at that point, even though it technically violates
the spec.

--Per Hedeland
p...@hedeland.org

Andrzej Adam Filip

unread,
Jul 4, 2008, 10:21:54 AM7/4/08
to
RICCARDO <castellan...@tiscali.it> wrote:
> [...]

> I'm agree with Andrzej Adam Filip, huge messages can glut my lan !
> We can't wait message was finished to transmit before rejecting.

Use simple Andrew instead of full AAF. I do not expect non polish
speakers to use Andrzej except on more formal occasions.

--
[pl>en Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
Perl is designed to give you several ways to do anything, so
consider picking the most readable one.
-- Larry Wall in the perl man page

RICCARDO

unread,
Jul 4, 2008, 10:39:33 AM7/4/08
to
On 4 Lug, 16:21, Andrzej Adam Filip <a...@onet.eu> wrote:

> RICCARDO <castellani.ricca...@tiscali.it> wrote:
> > [...]
> > I'm agree with Andrzej Adam Filip, huge messages can glut my lan !
> > We can't wait message was finished to transmit beforerejecting.
>
> Use simple Andrew instead of full AAF. I do not expect non polish
> speakers to use Andrzej except on more formal occasions.
>
> --
> [pl>en Andrew] Andrzej Adam Filip : a...@priv.onet.pl : a...@xl.wp.pl

> Perl is designed to give you several ways to do anything, so
> consider picking the most readable one.
> -- Larry Wall in the perl man page

Andrew,
network traffic problem can happen, for example in my wide company
(2000 users) where there are several remote sites and many subnets,
a distract user often send huge messages using Outlook Express and
they don't realize that message is left in OE queue; mail client tries
periodically to send it until you delete it from in "outbox mail" and
this cause network disturb.


David F. Skoll

unread,
Jul 4, 2008, 6:23:01 PM7/4/08
to
Per Hedeland wrote:

> If the client (correctly) advertises the size on the MAIL command as
> specified in the SIZE SMTP extension, sendmail will reject the message
> at that point.

Note that even if the client is willing to do this, if you put a
*$&&*%$ Cisco router in between Sendmail and the client, the #*$&*&#$
Cisco router may block Sendmail's "ESMTP" banner and may ALSO block the
client's "EHLO" forcing it to fall back on "HELO" and no SMTP extensions.

Did I mention my feelings about #*&$*#$ Cisco?

Regards,

David.

Andrzej Adam Filip

unread,
Jul 4, 2008, 6:31:45 PM7/4/08
to

You have not ;-)

--
[pl>en Andrew] Andrzej Adam Filip : an...@priv.onet.pl : an...@xl.wp.pl
It's not an optical illusion, it just looks like one.
-- Phil White

Clemens Zauner

unread,
Jul 4, 2008, 7:55:11 PM7/4/08
to
David F. Skoll <d...@roaringpenguin.com> wrote:
> Note that even if the client is willing to do this, if you put a
> *$&&*%$ Cisco router in between Sendmail and the client, the #*$&*&#$

This is not a router, but the firewall from this vendor - formerly
known as PIX, now ASA. At least this is not the default behaviour
in newer version - one has to switch "fuckup SMTP" on.

cu
Clemens.

PS: There were nastier bugs in there - for instance the one eating
the trailing dot in the data-phase under certain circumstances.
Funny, wasn't it.
--
/"\ http://czauner.onlineloop.com/
\ / ASCII RIBBON CAMPAIGN
X AGAINST HTML MAIL
/ \ AND POSTINGS

Tilman Schmidt

unread,
Jul 8, 2008, 8:04:27 AM7/8/08
to
Clemens Zauner schrieb:

> David F. Skoll <d...@roaringpenguin.com> wrote:
>> Note that even if the client is willing to do this, if you put a
>> *$&&*%$ Cisco router in between Sendmail and the client, the #*$&*&#$
>
> This is not a router, but the firewall from this vendor - formerly
> known as PIX, now ASA.

This was correct originally, but the vendor is blurring the line by
shipping "Firewall" feature sets for its routers containing similar
features as those found in ASAs.

> At least this is not the default behaviour
> in newer version - one has to switch "fuckup SMTP" on.

ASAs still have "inspect esmtp" (the successor to the "f**up" command
you are referring to) enabled by default, so they'll still mess with
the content of SMTP connections. The "progress" (if you will) is that
they don't block EHLO outright anymore. They have learnt about ESMTP,
and will allow some ESMTP features even with the default setting.
Unfortunately the ASA documentation doesn't seem to tell which ones,
so I would have to reactivate "inspect esmtp" on one of my ASAs in
order to see whether the "SIZE=" argument of the MAIL verb is one of
those that may pass unharmed. (Which I have no intention of doing.)

HTHAB
T.

--
Please excuse my bad English/German/French/Greek/Cantonese/Klingon/...

RICCARDO

unread,
Jul 11, 2008, 10:08:29 AM7/11/08
to

But after this discussion, can someone tell me if Outlook Express or
Microsoft Outlook use as default ESMTP extensions to communicate msg
size ?

loki harfagr

unread,
Jul 11, 2008, 2:53:27 PM7/11/08
to

Some folks from the MSOE and MSO breeders company may help you
if you have the money and if you have the time and if you have the
correct registration number for the exact combination of
version/release/patch/patchedpatch/antipatchpatchedpatch-potsh/wot,
and, of course, as soon as they're finished with their
last "MS saves Web" krokakanda.

Carl Byington

unread,
Jul 12, 2008, 2:57:03 AM7/12/08
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 11 Jul 2008 07:08:29 -0700, RICCARDO wrote:

[snip]


> But after this discussion, can someone tell me if Outlook Express or
> Microsoft Outlook use as default ESMTP extensions to communicate msg
> size
> ?

X-Mailer: Microsoft Outlook, Build 10.0.3416
That one does not use SIZE= esmtp extension on MAIL FROM command.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFIeFWyL6j7milTFsERAnCEAJsEnd+4JYJzIB83+5ZwmExErKg3JACePScA
lt4+uyfyTsQOOE1pvTGA1Ys=
=kgcd
-----END PGP SIGNATURE-----

Joe Brennan

unread,
Jul 17, 2008, 10:52:23 AM7/17/08
to
Outlook and Outlook Express do not implement ESMTP. They neither
state the size before sending, nor ask the smtp server what size it
will accept. They just send and see what happens.

Under some condition we have not diagnosed, Outlook will also treat
the 550 response as a temporary failure and re-send the huge message
repeatedly. Users report seeing no error message on screen and are
not aware that the message was not sent successfully or that it is
being re-sent endlessly.

Joseph Brennan
Columbia University IT

Grant Taylor

unread,
Jul 17, 2008, 11:10:43 AM7/17/08
to
On 07/17/08 09:52, Joe Brennan wrote:
> Outlook and Outlook Express do not implement ESMTP. They neither
> state the size before sending, nor ask the smtp server what size it
> will accept. They just send and see what happens.

*HEAVY SIGH* I can't say as I'm surprised.

> Under some condition we have not diagnosed, Outlook will also treat
> the 550 response as a temporary failure and re-send the huge message
> repeatedly. Users report seeing no error message on screen and are
> not aware that the message was not sent successfully or that it is
> being re-sent endlessly.

I wonder if Cisco's "SMTP F**K UP" was enabled in any of these
situations. I've recently run across a server that the hello line was
completely obfuscated by "*"s. However when I tried an EHLO on the
server it worked just fine. *sigh*

Grant. . . .

0 new messages