If you have multiple servers on a network, do you install postfix on each one
-
Re: Basic Email Sending with Linux
@scottalanmiller said in Basic Email Sending with Linux:
@brrabill said in Basic Email Sending with Linux:
If you have multiple servers on a network, do you install postfix on each one? Or just set up one? What's YOUR best practice there?
Yes, otherwise how will you send out the email as the client needs to communicate over the network and postfix is what provides the network protocol. The mailx command doesn't have a network component, it just drops files into the postfix local queue.
This is like asking, "Do I need to setup Exchange on every Windows computer that wants to send email?"
Just WTF...
Then entire reason for the question was because @BRRABill setup a Fedora box for something or another and then when he setup
dnf-automatic
, he was not receving the email notification.Obviously, somewhere on your network you need an email server. No sane person sets up every server instance to be an email server.
The correct solution is to setup a single mail server and use that to route all of the mail from everything in your network.
Anything else means dealing with, potentially many, various servers sending email in various forms, that you then have to handle SPF records for, as well as opening up outbound SMTP for on your firewall, etc.
-
Choose a method and stick with it.
I setup a
postfix
box on the LAN to handle sending emails and then point everything else to that. -
How are you getting the email from other servers to your relay, though?
-
And to fully answer @BRRABill's question, no you do not need
postfix
on every machine that want to send email. You need a mail client.Look, no
postfix
on my desktop, yet I receive mydnf-automatic
emails, becausednf-automatic
send mail to my mail server. It is a mail client, not a mail server.[jbusch@dt-jared ~]$ sudo dnf list installed postfix [sudo] password for jbusch: Last metadata expiration check: 1:59:50 ago on Mon Dec 18 12:54:02 2017. Error: No matching Packages to list [jbusch@dt-jared ~]$
-
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
-
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
SMTP can be sent via telnet. Nothing special is required of a system to send email.
-
Yeah, didn't see this thread before posting this: https://mangolassi.it/topic/15899/basic-email-sending-with-linux/9
If your email is hosted through somewhere else, such as O365, you'll need to edit your SPF record to allow emails from that server or use an SMTP server that authenticates with and relays to O365.
DNF-Automatic, for example, from what I've seen, does not have SMTP authentication options. So I've been using an SMTP server.
-
@tim_g said in If you have multiple servers on a network, do you install postfix on each one:
Yeah, didn't see this thread before posting this: https://mangolassi.it/topic/15899/basic-email-sending-with-linux/9
If your email is hosted through somewhere else, such as O365, you'll need to edit your SPF record to allow emails from that server or use an SMTP server that authenticates with and relays to O365.
DNF-Automatic, for example, from what I've seen, does not have SMTP authentication options. So I've been using an SMTP server.
Probably because I was annoyed and typing slowly...
-
Darth Jared taking on an apprentice to accomplish his own goals, in this case being a d***
I still am interested in hearing what you have to say about The Last Jedi though @JaredBusch
-
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
SMTP can be sent via telnet. Nothing special is required of a system to send email.
If it can be sent via telnet, can it be sent by ssh?
-
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
SMTP can be sent via telnet. Nothing special is required of a system to send email.
That's not how it works. The application still has to have SMTP in the app in order to send. The mail command, the one installed by mailx, does not have SMTP in it and just drops a file locally into the MTA's processing queue.
So for what @BRRABill was asking and demonstrating, yes an MTA like postfix is needed on each system. If you have a different email client than he and I were discussing that handles SMTP for you, then obviously you don't need that.
-
@nerdydad said in If you have multiple servers on a network, do you install postfix on each one:
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
SMTP can be sent via telnet. Nothing special is required of a system to send email.
If it can be sent via telnet, can it be sent by ssh?
This is getting really confusing. No, that's not how it works. Telnet is just a raw connection. SMTP is the protocol. Anything trying to send via it must implement the protocol. You can do HTTP over telnet, too, but that doesn't make it telnet, you still have to use HTTP.
-
@nerdydad said in If you have multiple servers on a network, do you install postfix on each one:
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
SMTP can be sent via telnet. Nothing special is required of a system to send email.
If it can be sent via telnet, can it be sent by ssh?
SMTP has no encrypted connection handling, so no. The payload can be encrypted once the SMTP connection is established (STARTTLS), but SMTP has no encryption prior to that.
-
My root issue, I guess, if that I cannot get dnf-automatic to send e-mail to any public e-mail servers. Not Office365, for example.
Can I get it to send to my internal e-mail server on my internal network? Sure.
-
@tim_g said in If you have multiple servers on a network, do you install postfix on each one:
Yeah, didn't see this thread before posting this: https://mangolassi.it/topic/15899/basic-email-sending-with-linux/9
If your email is hosted through somewhere else, such as O365, you'll need to edit your SPF record to allow emails from that server or use an SMTP server that authenticates with and relays to O365.
DNF-Automatic, for example, from what I've seen, does not have SMTP authentication options. So I've been using an SMTP server.
SPF is optional and loads of email services either don't care or only prefer it. It's good, but it's not part of base SMTP and not required for email to be "working". Like many things, like MX, SPF, and PTR records, many services either demand them or encourage them, but they are extra, optional security checks to reduce the chance of spam and are a totally different topic - one of convincing third parties that you are not a spammer, which is not the same at all as the system level task of sending email out.
-
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@nerdydad said in If you have multiple servers on a network, do you install postfix on each one:
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
If you have a client that implements SMTP, you are all set. But without that, postfix is needed (or something) that adds SMTP capabilities.
SMTP can be sent via telnet. Nothing special is required of a system to send email.
If it can be sent via telnet, can it be sent by ssh?
SMTP has no encrypted connection handling, so no. The payload can be encrypted once the SMTP connection is established (STARTTLS), but SMTP has no encryption prior to that.
If you sent over SSH, though, it would. You actually get. Given that you used the telnet example, and use that connection methodology to say that you can send over telnet, you can actually do that over SSH, too. It's really silly, but if you are running the SMTP protocol manually then it works over SSH just like over telnet.
-
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
@tim_g said in If you have multiple servers on a network, do you install postfix on each one:
Yeah, didn't see this thread before posting this: https://mangolassi.it/topic/15899/basic-email-sending-with-linux/9
If your email is hosted through somewhere else, such as O365, you'll need to edit your SPF record to allow emails from that server or use an SMTP server that authenticates with and relays to O365.
DNF-Automatic, for example, from what I've seen, does not have SMTP authentication options. So I've been using an SMTP server.
SPF is optional and loads of email services either don't care or only prefer it. It's good, but it's not part of base SMTP and not required for email to be "working". Like many things, like MX, SPF, and PTR records, many services either demand them or encourage them, but they are extra, optional security checks to reduce the chance of spam and are a totally different topic - one of convincing third parties that you are not a spammer, which is not the same at all as the system level task of sending email out.
While all 100% true, they are required if you want the mail your are sending with the system out to be received in today's world.
-
@brrabill said in If you have multiple servers on a network, do you install postfix on each one:
My root issue, I guess, if that I cannot get dnf-automatic to send e-mail to any public e-mail servers. Not Office365, for example.
Can I get it to send to my internal e-mail server on my internal network? Sure.
This is very different from what you asked. You asked about getting email working from the OS, and the OS does it with postfix and the standard mail command that you were trying to use depends on an MTA. Other applications may have their own SMTP individually. But that is a question about an application sending email, not about Linux or the OS sending it. Totally different concepts.
-
@jaredbusch said in If you have multiple servers on a network, do you install postfix on each one:
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
@tim_g said in If you have multiple servers on a network, do you install postfix on each one:
Yeah, didn't see this thread before posting this: https://mangolassi.it/topic/15899/basic-email-sending-with-linux/9
If your email is hosted through somewhere else, such as O365, you'll need to edit your SPF record to allow emails from that server or use an SMTP server that authenticates with and relays to O365.
DNF-Automatic, for example, from what I've seen, does not have SMTP authentication options. So I've been using an SMTP server.
SPF is optional and loads of email services either don't care or only prefer it. It's good, but it's not part of base SMTP and not required for email to be "working". Like many things, like MX, SPF, and PTR records, many services either demand them or encourage them, but they are extra, optional security checks to reduce the chance of spam and are a totally different topic - one of convincing third parties that you are not a spammer, which is not the same at all as the system level task of sending email out.
While all 100% true, they are required if you want the mail your are sending with the system out to be received in today's world.
Most people sending emails from servers are sending to themselves, not in general. So even in the "real world", this almost never applies. I certainly don't have any use for it on my systems.
-
@scottalanmiller said in If you have multiple servers on a network, do you install postfix on each one:
@brrabill said in If you have multiple servers on a network, do you install postfix on each one:
My root issue, I guess, if that I cannot get dnf-automatic to send e-mail to any public e-mail servers. Not Office365, for example.
Can I get it to send to my internal e-mail server on my internal network? Sure.
This is very different from what you asked. You asked about getting email working from the OS, and the OS does it with postfix and the standard mail command that you were trying to use depends on an MTA. Other applications may have their own SMTP individually. But that is a question about an application sending email, not about Linux or the OS sending it. Totally different concepts.
I told you that oyu gave the corect answer on an incorrectly worded question.