SSMTP
이미 구축된 SMTP서버를 이용하여 메일을 전송
설치
sudo apt install ssmtp
설정
/etc/ssmtp/ssmtp.conf
gmail 예시
AuthMethod=LOGIN
UseTLS=YES
UseSTARTTLS=YES
mailhub=smtp.gmail.com:587
AuthUser=username@gmail.com
AuthPass=password
메일 전송 테스트
echo 'From: "계정"' | ssmtp 받는메일주소 -v