CentOS7 Sendmail test send email


# Install sendmail sendmail-cf m4
yum install sendmail sendmail-cf m4

# edit local host name
vi /etc/mail/local-host-names
xxx.com

# edit sendmail.mc
vi /etc/mail/sendmail.mc

#change 127.0.0.1 to 0.0.0.0
DAEMON_OPTIONS(`Port=smtp,Addr=0.0.0.0, Name=MTA')dnl

# change sendmail setting
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf

# setting relay
vi /etc/mail/access
Connect:xxx.com RELAY

# hash database
makemap hash access < access

# restart sendmail
systemctl restart sendmail

# test php send mail
php -a
mail('user@receiver.com', "Test email", "Test email from the Internet", null, "-f user@sender.com");

Google Drive API 重新授權

1. 移除 json
2. 使手 CLI 取得網址,再取得 code 重新授權