LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-13-2019, 04:47 PM   #1
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,023

Rep: Reputation: 75
opening port for incoming traffic for send-only e-mail server


Hello,

I would like to know: if I configure a send-only smtp on a linux server, would there be any sense in letting in any incoming traffic whatsoever to port 25 and/or 587? Would the sessions initialised by the server itself be enough for that?

What happens in the case other SMTPs to which I'm sending e-mails are going to send notifications of e-mails bouncing or e-mails confirmation? How would that work?

Thank you in advance!

Last edited by vincix; 08-13-2019 at 05:02 PM.
 
Old 08-13-2019, 05:29 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,486

Rep: Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170
Quote:
Originally Posted by vincix View Post
Hello,

I would like to know: if I configure a send-only smtp on a linux server, would there be any sense in letting in any incoming traffic whatsoever to port 25 and/or 587? Would the sessions initialised by the server itself be enough for that?

What happens in the case other SMTPs to which I'm sending e-mails are going to send notifications of e-mails bouncing or e-mails confirmation? How would that work?

Thank you in advance!
port 25 is for receiving email. Yes, you'd have to receive BOUNCEs if you're sending email, so that port would need to be open, unless the Reply To and envelope-sender of the outgoing mail are for a different server, so the BOUNCEs don't come back to the sending server.
Not accepting BOUNCEs somewhere would be bad, and in violation of the RFCs

port 587 is for logging in to a server to send mail. Obviously, it would have to be open to incoming traffic to do that.

You need to configure and run a server for each port you want to use.

No, the smtp session configuration(s) won't "open" a port that's closed by a firewall.

Last edited by scasey; 08-13-2019 at 05:31 PM.
 
Old 08-13-2019, 05:42 PM   #3
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,023

Original Poster
Rep: Reputation: 75
Hey, scasey. Thank you your helpful the answer. Can you please expand on your last sentence? What do you mean it won't open a port that's closed by a firewall exactly?
 
Old 08-13-2019, 05:55 PM   #4
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,486

Rep: Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170
Quote:
Originally Posted by vincix View Post
Hey, scasey. Thank you your helpful the answer. Can you please expand on your last sentence? What do you mean it won't open a port that's closed by a firewall exactly?
You asked about opening or closing ports.
That's done with a firewall.
If a port is closed, then nothing can access the server that might be listening on it, because of the firewall.
If you run a smtp server on port 25, you will also need to be sure that the firewall (if you have one) is allowing inbound traffic on port 25. That's all I meant.
 
Old 08-14-2019, 05:27 AM   #5
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,023

Original Poster
Rep: Reputation: 75
Ok, that I knew, but otherwise, if I am going to be using the SMTP for sending out e-mails only, I won't be needing to open port 25 for incoming traffic, right? There aren't going to be any confirmation messages sent by the SMTP I'm sending e-mails to that would need me to explicitly open port 25 for incoming traffic (also when I'm sending from an e-mail address whose MX would point to another SMTP altogether). Or if the SMTP does send any notifications directly to my SMTP, would it do it using the stateful connection, meaning using the session that my SMTP has already initiated?

So this is what I'm trying to find out first is: are there any messages sent by the SMTP I'm sending e-mails directly to my SMTP regardless of the e-mail address I'm using to send e-mails with?

Last edited by vincix; 08-14-2019 at 05:40 AM.
 
Old 08-14-2019, 10:13 AM   #6
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,486

Rep: Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170Reputation: 1170
Quote:
Originally Posted by vincix View Post
Ok, that I knew, but otherwise, if I am going to be using the SMTP for sending out e-mails only, I won't be needing to open port 25 for incoming traffic, right? There aren't going to be any confirmation messages sent by the SMTP I'm sending e-mails to that would need me to explicitly open port 25 for incoming traffic (also when I'm sending from an e-mail address whose MX would point to another SMTP altogether). Or if the SMTP does send any notifications directly to my SMTP, would it do it using the stateful connection, meaning using the session that my SMTP has already initiated?

So this is what I'm trying to find out first is: are there any messages sent by the SMTP I'm sending e-mails directly to my SMTP regardless of the e-mail address I'm using to send e-mails with?
Why don't you just try it? Set it up and see if you get any inbound connections. (Leaving the inbound open for the test, of course)
I don't see how you can find out what foreign mail servers are going to do otherwise.
If you have nothing pointing to that server (in DNS) I wouldn't think any mail would come to it, but try it and see.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to configure serverX to forward traffic incoming on port 80/tcp from desktopX to port on 5243/tcp. pratik11886 Linux - Certification 4 07-15-2016 01:34 PM
Routing incoming port 80 traffic to new port PygamePi Linux - Server 10 03-25-2014 04:39 AM
Routing return traffic based on the NIC of the incoming traffic? adamk75 Linux - Networking 3 12-11-2011 04:27 AM
Redirect incoming traffic to an other port (ubuntu openvpn server) krisox Linux - Newbie 3 12-06-2010 12:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration