본문으로 바로가기

 

설치확인

sendmail -d0.1 -bv root

또는

rpm -q sendmail

 

설치

sudo yum install sendmail sendmail-cf -y

 

시작 및 부팅시 자동실행

sudo systemctl start sendmail
sudo systemctl enable sendmail

 

상태확인

sudo systemctl status sendmail

 

테스트 메일 전송

echo "This is the body of the email" | mail -s "Test Email from Sendmail" you@example.com

 

또는

sudo sendmail you@example.com <<EOF
Subject: Sendmail Test
From: yourname@yourdomain.com

This is a test message sent using sendmail on CentOS 7.
EOF

 

로그확인

sudo tail -f /var/log/maillog