Tuesday, August 13, 2024

SMTP Test commands sample

 


Sample test mail example :


Sample test:

 

echo "Subject: Testing  pscoeprd"|/usr/sbin/sendmail -F abcd@abcd.gov -t prasanth.bhaskaran@abcd.com

 

echo "TEST MAIL FROM $HOSTNAME" | mail -r $HOSTNAME -s "TEST MAIL FROM $HOSTNAME" talktoprasa@gmail.com

 

echo "test email from `hostname`" | mailx -v -s "test email from `hostname`" -r noreply@@abcd.com  <<to_address>>

Validate below service:

service sendmail status

 

Logs location :

 

/var/spool/mail/root   -- SMTP Log location

 

tail -f /var/log/maillog   -- mail log location 



No comments:

Post a Comment