![동일한 로컬 컴퓨터에서 나에게 이메일을 보내는 방법(tcp 포트 25)](https://linux55.com/image/28071/%EB%8F%99%EC%9D%BC%ED%95%9C%20%EB%A1%9C%EC%BB%AC%20%EC%BB%B4%ED%93%A8%ED%84%B0%EC%97%90%EC%84%9C%20%EB%82%98%EC%97%90%EA%B2%8C%20%EC%9D%B4%EB%A9%94%EC%9D%BC%EC%9D%84%20%EB%B3%B4%EB%82%B4%EB%8A%94%20%EB%B0%A9%EB%B2%95(tcp%20%ED%8F%AC%ED%8A%B8%2025).png)
나에게 이메일을 보내는 방법을 아는 사람이 있나요?
포트 25에서 TCP 트래픽을 생성하려고 합니다.
답변1
smtp 서버가 작동하는지 테스트하거나 쉘 스크립트를 통해 이메일을 보내야 합니까?
스웍스- SMTP 스위스 군용 칼
Swaks is a featureful, flexible, scriptable, transaction-oriented
SMTP test tool written and maintained by John Jetmore. Features include:
* SMTP extensions including TLS, authentication, and pipelining
* Protocols including SMTP, ESMTP, and LMTP
* Transports including unix-domain sockets, internet-domain sockets
(IPv4 and IPv6), and pipes to spawned processes
* Completely scriptable configuration, with option specification
via environment variables, configuration files, and command line
답변2
텔넷(SMTP 프로토콜 테스트)
이메일 서버에서 자신에게 이메일을 보내려고 하는 경우
telnet localhost 25
이 경우 이메일 서버는 일반적으로 로컬 호스트의 모든 내용을 수락하므로 올바른 HELO 또는 로그인 콘텐츠에 대해 전혀 걱정할 필요가 없습니다.
이메일 서버를 통해 자신에게 이메일을 보내려는 경우
telnet <email-server> 25
이 경우 구성에 따라 메일함이 이메일 서버가 아닌 경우(mx 레코드 또는 spf 레코드 없음 등) 이메일 서버가 이메일을 거부할 수 있습니다.
그런 다음 이것을 따르십시오튜토리얼 링크
답변3
# echo "This is message body" | mail -s "This is subject" [email protected]
또는
# mail -s "My Subject" [email protected] < msg.txt