|
From: RICCARDO on 4 Jul 2008 08:58 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 ?
From: Per Hedeland on 4 Jul 2008 09:11 In article <6a684c62-e204-44ce-b225-29262265df7f(a)f63g2000hsf.googlegroups.com> RICCARDO <castellani.riccardo(a)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 Hedeland per(a)hedeland.org
From: RICCARDO on 4 Jul 2008 09:30 On 4 Lug, 15:11, p...(a)hedeland.org (Per Hedeland) wrote: > In article > <6a684c62-e204-44ce-b225-29262265d...(a)f63g2000hsf.googlegroups.com> > > RICCARDO <castellani.ricca...(a)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...(a)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 ?
From: Andrzej Adam Filip on 4 Jul 2008 09:55 per(a)hedeland.org (Per Hedeland) wrote: > In article > <6a684c62-e204-44ce-b225-29262265df7f(a)f63g2000hsf.googlegroups.com> > RICCARDO <castellani.riccardo(a)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 Hedeland > per(a)hedeland.org 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 : anfi(a)priv.onet.pl : anfi(a)xl.wp.pl Live long and prosper. -- Spock, "Amok Time", stardate 3372.7
From: RICCARDO on 4 Jul 2008 10:09
On 4 Lug, 15:55, Andrzej Adam Filip <a...(a)onet.eu> wrote: > p...(a)hedeland.org (Per Hedeland) wrote: > > In article > > <6a684c62-e204-44ce-b225-29262265d...(a)f63g2000hsf.googlegroups.com> > > RICCARDO <castellani.ricca...(a)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...(a)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...(a)priv.onet.pl : a...(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. |