I need to know the fixed upper limit on message size SMTP server. For instance, for GMAIL we have 25MB as limit for sending mail.
Can any one please help me with command that I can use. I referred to RFC 1870 for the same.
Thanks and Regards, NehaC
You can get a guess of this by sending an EHLO
message and seeing if the server responds with a SIZE
:
$ nc -v aspmx.l.google.com. 25
Connection to aspmx.l.google.com. 25 port [tcp/smtp] succeeded!
220 mx.google.com ESMTP gv4si23346623qab.115
EHLO somehost
250-mx.google.com at your service, [YOUR_IP]
250-SIZE 35882577
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES
In this case, the server reported a limit of 35 MB.
http://cr.yp.to/smtp/size.html
For Gmail.. This worked for me. - user1312132 2012-04-04 07:03
host yahoo.com
to get their MX records listing their SMTP servers - A B 2012-04-04 08:58
SMTP
HELO
/EHLO
response indicates maximal message size, see http://www.samlogic.net/articles/smtp-commands-reference.htm:
SIZE The SIZE command has two purposes. The SMTP server can inform the client what is the maximum message size and the client can inform the SMTP server the (estimated) size of the e-mail message that will be sent. The client should not send an e-mail message that is larger than the size reported by the server, but normally it is no problem if the message is somewhat larger than the size informed by the client to the server. The example below shows how a server (S) and client (C) reports size to each other:
S: 250 SIZE 1000000
C: MAIL FROM:<mail@samlogic.com> SIZE=500000
The client sends the SIZE command, and size information, together with the MAIL FROM command. The server sends the command and size information alone. The size is always specified in bytes.