问题原文
原帖链接 · GTS Joe · CC BY-SA 3.0
I installed mailx in my Linux webserver running CentOS 7. When I try to send a test email,
echo "Body test." | mail -r "[email omitted]" -s "Subject Test" [email omitted]
I check my email and don't receive anything. However, if I use the mailq command, I get this:
postqueue: warning: Mail system is down -- accessing queue directly
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
7805D2DF 422 Wed Jan 11 15:00:40 [email omitted]
[email omitted]
已采纳解答
原帖链接 · Jacob Evans · CC BY-SA 3.0
mailx is a client, you still need an MTA like postfix/sendmail/exim, or specify a server
$ mailx -v -s "$EMAIL_SUBJECT" \
-S smtp=smtp://smtp.ust.hk \
-S from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)" \
$TO_EMAIL_ADDRESS
(options vary but I think this is right for rhl)
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
