Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to write a script that sends an e-mail with attachments (different sizes, different recipients). I wish prior to sending e-mail, somehow detect if recipient's mail server can handle the size of it. Is there a way to do this?

share|improve this question
up vote 2 down vote accepted

You can try to telnet to the recipients email server on port 25 and issue the EHLO command. The server should respond with the EHLO commands that it supports and should list the size limit that it supports. This is not a guaranteee that the recipient mailbox will accept an email of the same size though.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.