tags:

views:

824

answers:

6

Does all SMTP Communication to send emails between domains happens on port 25? Is all communication unsecured? Understand that using like gmail communication is secured to gmail server but after it must use unsecured port 25, right?

Correct SMTP can be on any port. But that is not what i am talking about. I am not talking about connecting to gmail, yahoo or ISP SMTP server. Those are the SMTP replay. And they accept SMTP requests on any port they wish encrypted/unencrypted for their user. But once SMTP relay server gets request, Mail server forwards it to email domain name MX record. That's where does it only use SMTP on port 25? and mail server has just knowledge of domain name and then forwards it. It can not know which port they are listening. Am i make sense? please correct me if misunderstood.

For example, I am hosting a exchange server 2007 for my domain. I connect to my exchange server to send mail to [email protected]. My exchange server must be doing communication over industry standard protocol, right? And that's port 25(As my exchange server didn't work without port 25).

+9  A: 

No. SMTP can be setup to use ports other than 25, although that is the standard port used.

SMTP is a protocol – it specifies HOW information is transmitted. The SMTP Server, on the other hand, is software (separate from the protocol itself) that does the transmission. The SMTP port is actually a listening port – clients connect to this in order to use the server – but it's separate from the protocol itself. Many mail servers are setup to use other ports. For example, Dreamhost sets up its mail servers to use both port 25 and 465.

Reed Copsey
+2  A: 

You can use any port, really. Port 25 is a convention, that's all. I hear that some providers block port 25 for outgoing traffic (to reign in spam bots), and people have to switch to other ports.

cdonner
Good point about the port being blocked.
Reed Copsey
A: 

SMTP uses port 25 by default, but can use any port.

Gmail SMTP Server requires an encrypted connection (SSL) on port 465.

Mitch Wheat
+1  A: 

Most current email software (clients and servers) can use SSL/TLS for SMTP. This usually means that port 25 is unencrypted SMTP and port 465 is encrypted. The actual port numbers can be changed and it is only by convention that port 25 is SMTP.

I should mention that secure SMTP via port 465 isn't standard. The official, encouraged way of doing secure SMTP is via port 25.
Eduard - Gabriel Munteanu
In any case, if one really needs SMTP/465 it should also provide SMTP/25.
Eduard - Gabriel Munteanu
+1  A: 

Almost all communication between mail servers on the Internet is done on port 25. This the well known port.

See rfc4409, it reserves tcp/587 as an alternate submission port for SMTP. Port 25 and 587 are reserved for SMTP, and Submission through IANA http://www.iana.org/assignments/port-numbers.

SMTP can be secured via TLS over port 25, but this doesn't seem to be widely used for Internet email, but I know it is used for some internal communication on some networks.

Many ISPs seem to also accept submission on tcp/465, but this port isn't officially registered for this purpose.

Of course, any mail server could listen for SMTP on any port, but a sending server won't have any method to discover the alternate port and must assume that it is on port 25.

I know some organizations accept submissions from mail clients on other unusual ports like 2525 and others.

Zoredache
+2  A: 

Hi, Thought I would step in here, since I write email software for a living.

There are two common scenarios for SMTP traffic: 1)Server To Server and 2)Client to Server.

1)Server to Server All public server to server email communication takes place over port 25. If you want your domain to receive email from other domains, then you have to accept SMTP traffic at port 25. This is unsecurred. It's sent as clear text. There are ways of encoding the specific message, but as far as the traffic, it is sent as ascii text (obviously in binary format). But, it is not sent over SSL.

There is also some private server to server communication that can take place. This might take place in large organizations, where they might have the internal corporate server that every one uses. When you send an email, it is sent to the corporate server, but then this corporate server forwards the email off to a public facing server. That public facing server sends the email off to a receiving server. That receiving server is accepting email at port 25.

2)Client to Server. This has more options. On the server you can configure different submission ports (open ports you will accept email on). These can be anything you want them to be. You just have to remember to tell your users to configure the client software correctly. The most common ports are 25 and 587. A lot of ISPs will block outgoing port 25 (since that is what spam bots use -- to send to public mail servers). But, they have 587 open so you can send email to your SMTP server. The common port for SMTP over SSL is 465.

Obviously, this can get a lot more complicated, and I've left out a good bit of detail, but that's it in a nutshell.

Cheers! Dave

dave wanta