Understanding the mailx Command and the SMTP Server and MTA

Asked 2 years ago, Updated 2 years ago, 166 views

I don't know how to send mail, so I'm looking for the easiest mailx command, but I don't understand the meaning below.

Use the mailx command to test the SMTP server to send mail

When you send an e-mail, you give the e-mail command followed by the e-mail address to which you want to send the e-mail.The SMTP server used for this is localhost.

For example, when executing the following command on CentOS 7 in the default state,

Is the SMTP server localhost?

·In this case, do you mean CentOS 7?
·Doesn't this situation mean that you have a mail server?
·Is it different from the host name presented to the external mail server as the mail transmission server?

Is MTA Sendmail?

Install Postfix in CentOS 7

Sendmail

is the default mail server (MTA) for CentOS 7.

If I translate it into Japanese, does it look like the following?
·From the SMTP server that is the localhost to the SMTP server that manages example.com using Sendmail MTA without SMTP authentication

mail

2022-09-30 21:40

2 Answers

The default is Normally, mailx invokes sendmail(8)directly to transfer messages. as described in mail(1) or mailx(1) (which is the same substance and therefore the same content).If Postfix (postfix package) is installed, sendmail(8) is that of Postfix, so it is up to Postfix to decide what shipping route it will take after that.


2022-09-30 21:40

The first question is that localhost is the hostname that points to 127.0.0.1.
127.0.0.1 refers to itself with a special IP address called a loopback address.

The second question is the MTA= Postfix= STMP server.
The default MTA for Centos 7 is Postfix.You can also choose Sendmail, but it is deprecated.
*You can forget about Sendmail.

If you send mail by mailx, mailx connects to Postfix (tcp/25=SMTP) on localhost to request mail.

The postfix then connects to the SMTP server for the destination email address. If you set myhostname=smtp.example.com, the postfix is called smtp.example.com for the destination SMTP.

SMThe SMTP protocol requires you to name the server first.


2022-09-30 21:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.