Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 setup a mail server. I added MX record to NS server and now i would like to know which port i should open, maybe just smtp 25? In this case can I set SMTP to use SSL connection (with an auto-verified certificate) and user/password authentication or should I leave a unsafe connection?

Thank you.

share|improve this question
up vote 0 down vote accepted

If you created an MX record then I assume this server is for receiving mail that is addressed to your users and arriving from other servers on the Internet.

For this usage:

  • use port 25
  • do not require AUTH
  • reject all recipients that are not valid users of your server (don't be an open relay)
  • you might be able to require STARTTLS, though it might possibly prevent certain servers from sending to you

The situation is different if you have users that will send mail out through this server. In this case the MX record is not used. For this use:

  • require STARTTLS
  • require AUTH, but only after STARTTLS
  • require the MAIL FROM (envelope sender) to match the authenticated user
share|improve this answer
Where can i find the "reject all recipients that are not valid users of your server" option in exchange, please? Thank you. – Tobia Aug 1 '12 at 7:02
I don't know. I use postfix. – dsh Aug 1 '12 at 13:49

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.