What is the port number when mail from outside comes to the mail server?

Asked 2 years ago, Updated 2 years ago, 58 views

We have a mail server on the rental server and operate it from our own company.You can identify your own IP.
This server sends mail and receives non-delivery mail through its PHP program.

We limit unwanted and suspicious access by port number in the firewall and do not want to prevent necessary access.

(Access you want to restrict)
(a)You can only send mail using your own mail server (IP restrictions)
(b)You only want to view mail that arrives on your mail server (IP restrictions)

(Access you don't want to block)
(c)I want to send mail from my own mail server to an external mail server.
(d)I want to receive mail from an external mail server that arrives at my mail server.

In relation to (a)(b) above, we plan to restrict non-proprietary IPs to prevent external access to the port numbers that communicate with:
·SMTP (with or without SSL), POP3 (with or without SSL), IMAP (with or without SSL)

I imagine that the measures (which limit external access) described in the Plan are probably normal.

Should I understand that access from my server to the outside should not be restricted or restricted normally?
Is there any problem if I block it?

What port number of the access destination and external mail server do you use to communicate with the communication in paragraph (c) above?
What port number do you use to communicate with (d) above?
(I would like to keep in mind that this will not be blocked, so I would like to understand it correctly.)

Learn how you send emails and how they work|JAGAT

Based on the diagram above, I would like to know the port number used for the following communication:

4. Manage the email address of the destination from the mail server [A]
  Forward mail to mail server [B]

Thank you for your cooperation.Thank you.

mail

2022-09-30 14:40

2 Answers

Should I understand that access from my server to the outside should not be restricted or restricted normally?
Is there any problem if I block it?

You don't need to limit it unless you have a specific reason. At a minimum, SMTP (TCP25) and DNS, and HTTP/S may not be a problem if you can use it for all kinds of software updates...

What port number of the access destination and external mail server do you use to communicate with the communication in paragraph (c) above?
What port number do you use to communicate (d) above?

In principle, any communication between SMTP servers should be addressed to TCP 25.


2022-09-30 14:40

Basically, you can tell which ports each protocol uses by looking at the specifications (although there may be some other historical background...)

Also, the English version of Wikipedia was well organized on this topic, so I have attached a link together.

English Wikipedia: Simple Mail Transfer Protocol (especially Ports section)

  • Port 25: RFC5321 4.5.4.2.Receiving Strategy says that the SMTP server will continue to listen to port 25.
  • Port 465: RFC8314 3.3. Implicit TLS for SMTP Submission is written to be used for submissions services.In the same section, it also states that SMTP servers and clients should implement Implicit TLS on port 465.
  • Port 587: RFC8314 3.3. Implicit TLS for SMTP Submission states that SMTP servers and clients should implement STARTTLS on port 587 (for the duration of the transition).

English Wikipedia: Post Office Protocol

  • Port 110: RFC 1939 3. Basic Operation writes that POP3 servers listen to port 110.
  • Port 995: RFC8314 3.1. Implicit TLS for POP writes that port 995 is used by default for pop3s service

English Wikipedia: Internet Message Access Protocol

  • Port 143: RFC3501 2.1.Link Level says IMAP4rev1 server listens to port 143
  • Port 993: RFC8314 3.2. Implicit TLS for IMAP writes that port 993 is used by default for imaps service.


2022-09-30 14:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.