2022. 12. 17. 17:01 WorkHolic
SMTP 테스트(bash and telnet to test an email)
728x90
반응형
SMTP 테스트(bash and telnet to test an email)
[[ $4 ]] || {
printf "Usage\n\t$0 <domain> <email> <from_email> <rcpt_email>\n"
exit 1
}
{
sleep 1
echo "helo $2"
sleep 0.5
echo "mail from:<$3>"
sleep 0.5
echo "rcpt to:<$4>"
echo
} | telnet $1 25 |
grep -q "Unknown user" &&
echo "Invalid email" ||
echo "Valid email"
Usage :
./script.sh domain email from_email rcpt_email
https://stackoverflow.com/questions/14326350/bash-and-telnet-to-test-an-email
#SMTP #메일테스트 #bash
728x90
SMALL
'WorkHolic' 카테고리의 다른 글
root login이 금지된 ssh 서버에 root로 sftp 사용하기 (0) | 2022.12.26 |
---|---|
WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE / JUNIPER / 주니퍼 (0) | 2022.12.20 |
POP3 접속 테스트 (BASH check POP3 mail with telnet) (0) | 2022.12.17 |
PHP SQL Injection 방지 처리 코드 (4) | 2022.11.30 |
SSD 돌연사 #2 (0) | 2022.11.18 |