How to get fixed upper limit on message size SMTP server

I need to know a fixed upper limit for the message size SMTP server. For example, for GMAIL we have 25 MB as the limit for sending mail.

Can someone help me with a team that I can use. I referenced RFC 1870 for the same.

Thanks and Regards, NehaC

+6
source share
2 answers

You can guess this by sending an EHLO message and seeing if the server is responding with 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

+8
source

SMTP HELO / EHLO response indicates the maximum message size, see http://www.samlogic.net/articles/smtp-commands-reference.htm :

SIZE The SIZE team has two goals. The SMTP server can tell the client what the maximum message size is, and the client can tell the SMTP server (estimated) size of the email message to be sent. The client should not send an email message that is larger than the size reported by the server, but this is usually not a problem if the message is slightly larger than the size specified by the client for the server. The example below shows how server (S) and client (C) report 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 along with the MAIL FROM command. The server sends information about the command and size. Size is always indicated in bytes.

+2
source

Source: https://habr.com/ru/post/912360/


All Articles