mailx コマンドでメールを送信すると "Unexpected EOF on SMTP connection" が表示される
詳細
Heirloom mailx の mailx コマンドでメールを送信すると、次のメッセージが表示されて送信に失敗する。
Unexpected EOF on SMTP connection "/home/ubuntu/dead.letter" 1/1 . . . message not sent.
原因
.mailrc の set smtp=... の URL にスキーム (smtp://) を付け忘れていたため。
set smtp=smtp.gmail.com:465
解決方法
.mailrc の set smtp=... の URL にスキーム (smtps://) を付ける。
set smtp=smtps://smtp.gmail.com:465