Ret Hat under SendMail
Tools: RHEL7.5, Win7
SendMail Server: RHEL7.5
--------------------------------------------------------------------------------------------------------------- -------------
*************************************************************************************************************** **************
1. Installing the SendMail Component
Check whether the SendMail component is installed
Rpm-qa | grep sendmail
See if there are SendMail series packages
Yum Grouplist SendMail
See SendMail related Packages
Yum List | grep sendmail
2. Installing the SendMail Component
Yum Install Sendmail-y
3. Edit the/etc/aliases file
Vi/etc/aliases
# Trap decode to catch security attacks
Decode:root
# person who should get root ' mail
#root: Marc
If I configure an alias to be root, configure the Receive message (the message below is just a template)
4. Modify the configuration file sendmail.cf
Vim/etc/mail/sendmail.cf
# Host/domain names ending with a tokens in class P is canonical
Cp.
# "Smart" Relay host (may be null)
DS[XXX.XXX.XXX.XXX]
# operators that cannot is in local usernames (i.e., network indicators)
CO @%!
# A class with just dot (for identifying canonical names)
5. Restart the SendMail service
Service SendMail Restart
6. Test Mail Service
Use the Mail command to test for successful receipt of the message, as shown below. If successful, indicates that the previous configuration is OK, and if you do not receive the message, you must check the log and then diagnose the problem based on the specific error message.
[email protected] ~]# cat > Test.txt
It is only test
^z
[1]+ Stopped cat > Test.txt
[Email protected] ~]# mail-s "test" [email protected] < Test.txt
[Email protected] ~]#
[Azrlnx06azlnx06 ~]$ Echo ' It's only a test ' | Mail-s "Test Eamil" [email protected]
[Email protected] ~]$
Ret Hat under SendMail