ssh 루트 로그인에 전자 우편 경고를 작성하려고하므로 ssmtp 및 메일 유틸리티 를 설치해야 합니다.
그런 다음 ssmtp.conf 파일을 다음과 같이 구성 했습니다 .
# Config file for sSMTP sendmail
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=postmaster
#Adding email id to receive system information
root = rootuser@gmail.com
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
#mailhub=mail
mailhub = smtp.gmail.com:587
AuthUser=dmymail@gmail.com
AuthPass=plaintext password
UseTLS=YES
UseSTARTTLS=YES
# Where will the mail seem to come from?
rewriteDomain=gmail.com
# The full hostname
hostname = mailserver
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
다음과 같이 개정 할 수 있습니다.
# Format: local_account:outgoing_address:mailhub
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
root:rootuser@gmail.com:smtp.gmail.com:25
이 오류가 발생합니다.
send-mail: Authorization failed (534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 ni5sm3908366pbc.83 - gsmtp)
Can't send mail: sendmail process failed with error code 1
그러나 그것은 작동하지 않았습니다. 이걸 정리하도록 도와주세요