2023年9月15日 星期五

手動使用 SMTP 協定寄信

使用telnet or nc 手動使用 SMTP 協定寄信

在測試郵件伺服器是否正常時,可以使用這樣的方式手動寄送 Email:
nc localhost 25 << EOF
HELO host.example.com
MAIL FROM: <user@host.example.com>
RCPT TO: <user2@host.example.com>
DATA
Body of email.
.
QUIT
EOF

使用telnet
#telnet your.mail.server 25
EHLO service@your.mail.server
MAIL FROM:<service@your.mail.server> 
RCPT TO:<sj@toright.com>
DATA
SUBJECT: mail server text!
Test!!
.
 
quit

沒有留言:

Rocky Linux 防火牆設定方法

舉例: 當有一個Nginx Keepalived的設定需求,我需要開放http和https服務,並且開放vrrp的通訊協定。 會需要完成 Keepalived 與防火牆配置 : 確定 VRRP 協定與防火牆規則均已放行: sudo firewall-cmd --permanent...