Ret Hat under SendMail

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.