I used to set the sender suffix. This migration server forgot to record it from the beginning.
1: first, modify/etc/hosts. It is said that Sendmail uses the local domain name set in hosts. The solution is as follows:
127.0.0.1 aizher.com
Result: No.
2: Method 2: Fix/etc/mail/acess and add
Connect: aizher.com Relay
Result: The sendmail configuration is not successful. You can modify the sendmail configuration as follows: hosts/etc/mail/Local-host-names.
Aizher.com
3: method 3: Modify
Edit/etc/mail/sendmail. MC: local_domain ('localhost. localdomain ') DNL to local_domain ('youdomain. com') DNL and then M4 sendmail. MC> sendmail. cfservice Sendmail restart
Result: The path does not exist. Failed.
M4: Sendmail. MC: 10: cannot open '/usr/share/sendmail-CF/M4/Cf. M4': no such file or directory
The reason for the above error is that sendmail-cf is not installed and Sendmail is installed through yum.
Yum install sendmail-cf
4: Method 4: Modify the host name. Remember to modify it before. The host name is related to the email sent by Sendmail. Vim/etc/sysconfig/Network
Networking = yeshostname = aizher. comgateway = 219.234.xx.xx
Run the following command to restart the network service:
/Etc/init. d/network restart
Run the following command to restart Sendmail:
/Etc/rc. d/init. d/sendmail restart
Result: The email is successfully sent using the login user name.
5: Method 5: directly modify it in PHP. ini,
Sendmail_path =/usr/sbin/sendmail-F admin@aizher.com-t-I
At this time, the admin@aizher.com method to send email, get it done.