電子メールを送信するには?

電子メールを送信するには?

次のコマンドを使用して、シェル(GNU bash、バージョン3.2.25(1)-リリース(x86_64-redhat-linux-gnu))からメールを送信しようとしています。

mail [email protected]

コマンドが完了した後、メッセージはメールボックスに表示されません。何が間違っている可能性があり、設定が正しいかをどのように確認できますか?ありがとうございます。

ベストアンサー1

SMTPダイアログボックスを表示するオプションを含むメールコマンドを使用します。 "heirloom"プロジェクトには、次のコマンドの良いバージョンがあります。http://heirloom.sourceforge.net/mailx.html

以下は、SMTPダイアログを表示する「mailx」(4年前v12.1と推定)コマンド呼び出しの例です。

10:50AM 2 % mailx -v -s "test email" bediger
test letter text
.
EOT
bediger... Connecting to [127.0.0.1] via relay...
220 mydomain.com ESMTP Sendmail 8.13.8/8.13.3; Wed, 2 Mar 2011 10:50:37 -0700
>>> EHLO myhost.intranet
250-mydomain.com Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<[email protected]> SIZE=222 [email protected]
250 2.1.0 <[email protected]>... Sender ok
>>> RCPT To:<[email protected]>
>>> DATA
250 2.1.5 <[email protected]>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 p22HobSb015513 Message accepted for delivery
bediger... Sent (p22HobSb015513 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 mydomain.com closing connection
10:50AM 3 %

この情報は、電子メール配信の問題を解決するために非常に重要です。

おすすめ記事