1. Overview
In a Linux operating system environment, you can configure a mail server, or you can configure a mailbox client. This article mainly configures the mail client, which is necessary for sending some system information to the server.
2. Mail client Installation 2.1 installation MAILX
Execute command: rpm -qa | grep mailx
to see if the system is installing MAILX, if it is not installed, you need to perform yum -y install mailx
the installation
2.2 Configuring MAILX
To edit the configuration file, add the following line in the last row:
set [email protected]set smtp=smtp.163.comset [email protected]set smtp-auth-password=xxxxxx# smtp-auth-password表示我邮箱的第三方客户端授权码set smtp-auth=login
2.3 Test Send
On the command line: mail -s "hello" [email protected] < /etc/hosts
If you receive the message, the configuration is successful
Linux configuration mail client sends mail