CentOS Setup SendMail sender, let sendmail not show through XXX generation

Source: Internet
Author: User

0. There is a very fast way

Command: hostname itzhanzhang.com, but the restart will not work, so please continue to look down once and for all methods:

1. Set your host name

The default hostname is similar to "Vm_24_76_centos" and the email address is "sent by <[email protected]_24_76_centos>"

And we do not like this address, you can modify the/etc/sysconfig/network file, modify the host name, such as my domain name is itzhanzhang.com, I can be modified as: hostname=itzhanzhang.com

2. Modify the SendMail domain name

Edit the/etc/mail/local-host-names file, add a domain name, such as my Itzhanzhang, can be modified as:

3. Modify the DNS server address

If there is no letter, there may be a problem with the DNS server, you can modify the/etc/resolv.conf file, I do not have a problem, it is not modified, such as:

4. Restart the Network Service

Command: Service Network restart

5. Test letters

This time the sender of [email protected] is displayed. I use the root user, it shows "[email protected]"

6. You can also modify the sender by modifying the php.ini file

Code: Sendmail_path =/usr/sbin/sendmail-f [email protected]-t-i

CentOS Setup SendMail sender, let sendmail not show through XXX generation

Related Article

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.