I've come across the way to set the sender suffix before , This migration server forgot , Record it from the beginning

1: The first method , modify /etc/hosts, It is said that sendmail Use hosts The local setting domain name inside , The repair method is as follows aizher.com

result : You don't succeed

2: The second method : Repair /etc/mail/acess, increase

Connect:aizher.com                      RELAY

result : You don't succeed , In the same way, I took a look at sendmail Related configuration , You don't have to change too much :http://blog.163.com/koumm@126/blog/static/95403837200921794034579/, But still vim  /etc/mail/local-host-names, Add the following


3: The third method , modify

 edit /etc/mail/sendmail.mc:
Change it to LOCAL_DOMAIN(`YOUDOMAIN.com')dnl
then m4 sendmail.mc >sendmail.cf
service sendmail restart

result , path does not exist , Failure

m4:sendmail.mc:10: cannot open `/usr/share/sendmail-cf/m4/cf.m4': No such file or directory

4: The fourth method : Modify hostname , I remember modifying it before , Host name and sendmail It's about sending mail ,vim /etc/sysconfig/network


By the following order , Restart network service
 /etc/init.d/network restart

Restart... With the following command sendmail

/etc/rc.d/init.d/sendmail restart

result : success , Email by login user name

5: The fifth method : Directly in php.ini Revision in China ,

sendmail_path = /usr/sbin/sendmail -f admin@aizher.com -t -i

Now , So admin@aizher.com Method of sending email, Get it done

php Of sendmail More articles about the sender's email settings

  1. sendmail Sender mailbox setting command

    sendmail Sender mailbox setting command   I've come across the way to set the sender suffix before , This migration server forgot , Record it from the beginning 1: The first method , modify /etc/hosts, It is said that sendmail Use hosts The local inside ...

  2. CentOS Set up sendmail Sender , Give Way sendmail Don't show through XXX Hair substitute

    0. There's a very fast way command :hostname itzhanzhang.com, But it will fail after restart , So please go on and look at the once and for all method : 1. Set your host name The default host name is something like “VM_24_76_cen ...

  3. zabbix adopt sendmail Make a mailbox alert

    install sendmail /usr/lib/zabbix/alertscripts/SendEmail.sh #!/bin/bash to_email_address="$1" # closed ...

  4. use python Email the mailbox , problem , And Solutions .

    Template import smtplib # Import related modules from email.mime.text import MIMEText from email.utils import formataddr de ...

  5. java Code send email verification code and qq mailbox smtp service

    Class encapsulation of sending mailbox , Before that, we need a jar package   javax.mail.jar Download link https://github.com/javaee/javamail/releases/download/JAVAM ...

  6. thinkphp5 Mail delivery (qq Mailbox as an example )

    One . First you need to turn on smtp service , Sign in qq mailbox , Enter settings -> Account Be careful : The authorization code will be generated after opening , Be sure to write down , Write down both , Logging in to the mail client requires . This authorization code is also required to configure e-mail sending Two . download phpm ...

  7. JavaWeb Through the mailbox to retrieve the password

    Developing JavaWeb In the project , Use email to help users find the password . Effect display :   I need an e-mailer jar package : javax.mail .jar1.JSP page ( Set mailbox input box ) HTML: <p > Please lose ...

  8. Use JavaMail Send email details

    package com.gqz.forfuture.email; import java.util.Date; import java.util.Properties; import javax.ma ...

  9. Follow the old boy to teach Python Development 【 Third articles 】:Python function

    set disorder , No repetition , Can be nested . function Create a function : 1.def keyword , Create a function 2. Function name 3.() 4. The body of the function 5. Return value Email function def sendmail():     import smtpl ...

Random recommendation

  1. git Set up key To the server , Synchronization code does not need to enter a user name and password

    1  ssh-keygen -t rsa 2  vim ~/.ssh/id_rsa.pub 3. Add to git The server , So the synchronization code doesn't need to enter a password

  2. osgi: Set up httpservice Port number

    Use osgi Development http Class Service, At startup, the default port is 80. But it is possible that this port has been occupied by other programs on this machine . So there are two ways to solve the problem :1) Close or modify the port of the occupier : 2) modify osgi Port at startup . ...

  3. Linux The first one at the bottom C Program

    First of all, make sure you Linux It's installed underneath GCC, If not installed GCC Please refer to : http://www.cnblogs.com/aspirant/p/3544398.html If you type gcc -v No more co ...

  4. unity3d Drag a piece of code with the mouse

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 This is a piece of code for dragging objects , It's simple and clear , To understand uni ...

  5. Android-- Convert the number of bytes to B,KB,MB,GB Methods

    // Convert the number of bytes to MB private String byteToMB(long size){ long kb = 1024; long mb = kb*1024; long gb = mb*1024 ...

  6. Moduli number system

    A number system with moduli is defined by a vector of k moduli, [m1,m2, ···,mk]. The moduli must be p ...

  7. Arduino Various modules Bluetooth module Mobile phone Bluetooth control Arduino LED The lamp

    Solution . Conditions : 1. mobile phone android Store download blueTerm 2. towards arduino Load the following code in : char val; ; void setup() { Serial.begin(); pi ...

  8. Map search on the plane --Java Learning notes ( Four )

    Copyright notice : This paper is written by Faye_Zuo Published on http://www.cnblogs.com/zuofeiyi/, This article can be reprinted in full or used in part , But please note the source . This month , All learning map search on the plane , Lord ...

  9. data structure —— strand (KMP)

    Empty string : The length is 0 String of Space string : A string of one or more spaces String commonly used 3 A method of internal representation : Fixed length sequential storage representation : Use a set of address contiguous storage units to store the character sequence of the string , Each string variable has a fixed length storage area , It can be described by a fixed length array ...

  10. CentOS6.x The graphical interface (gnome) install

    CentOS6 Default installation options Desktop : The basic desktop system , Including common desktop software , Such as document viewing tools . Minimal Desktop : The basic desktop system , It contains less software . Minimal : The basic system , ...