You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用mailx命令发送邮件时收到退信的解决咨询

解决mailx发送邮件后收到无效地址退信的问题

你的问题根源在于命令里多了一个多余的-,这个符号被mailx当成了收件人地址,服务器尝试投递到不存在的-@node.server.example.com,所以产生退信。

直接修改命令,移除那个多余的-即可:

echo "This is the body of the email.  There is stuff here.
Thank you for reading this.
Team Member" | mailx -r teammail@example.com -s "Email Subject" -a "filename.csv" email1@example.com email2@example.com email3@example.com

额外说明

部分mailx版本允许用-指定从标准输入读取邮件正文,但这个参数需要放在收件人列表之前。如果你的环境确实需要这个参数,调整后的命令应该是:

echo "This is the body of the email.  There is stuff here.
Thank you for reading this.
Team Member" | mailx -r teammail@example.com -s "Email Subject" -a "filename.csv" - email1@example.com email2@example.com email3@example.com

不过从你的退信情况来看,当前环境下这个-被解析成了收件人,所以直接移除是最稳妥的方案。

内容的提问来源于stack exchange,提问作者Sotark

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.12 01:37:09