Mutt 发送带有附件的电子邮件到个人和公司电子邮件地址

Mutt 发送带有附件的电子邮件到个人和公司电子邮件地址

[Mutt | CentOS 5.1] 我已经在 CentOS 上设置了 Mutt,并配置了 /etc/Muttrc 和 ~/.muttrc 文件。我可以发送不带附件的电子邮件,命令如下:

echo $Message | mutt -s "WARNING $Subject" [email protected]

这对于公司的电子邮件地址很有效,例如

echo $Message | mutt -s "WARNING $Subject" [email protected]

发送带附件的邮件时,出现奇怪的结果。我将通过以下案例来解释。

1> 发送到个人邮箱地址时([电子邮件保护]),可以附加多个文件。

echo $Message | mutt -s "NORMAL $Subject" [email protected] \
     -a test1.log -a test2.log

2> 发送到公司邮箱时([电子邮件保护]),如果附加了文件,则无法发送电子邮件。(cmd与上述类似)。但有趣的是,如果我附加/root/安装.log首先,邮件可以带附件发送出去,cmd如下:

echo $Message | mutt -s "NORMAL $Subject" [email protected] \
      -a /root/install.log -a test1.log -a test2.log

如果附件顺序发生变化,案件将发送失败。

从上述情况来看,我无法找出问题所在,我可能遗漏了什么配置?

答案1

由于您要将内容传输到 mutt,因此必须-x首先使用(mailx 撰写模式)选项。

答案2

来自 mutt(1):

   -a file [...]
          Attach  a  file  to  your  message  using MIME.  When attaching single or  multiple files, separating filenames and
          recipient addresses with "--" is mandatory, e.g. mutt -a image.jpg -- addr1 or mutt  -a  img.jpg  *.png  --  addr1
          addr2.  The -a option must be placed at the end of command line options.

答案3

我今天也遇到了同样的问题。你没有说错误消息是什么,但我敢打赌它说的是“无法启动无法附加文件”。

这是解决方案。“--”是强制性的,例如 mutt -a image.jpg -- 注意:-a 选项必须放在命令行选项的末尾。

http://ubuntuforums.org/showthread.php?t=1586810 http://www.linuxquestions.org/questions/linux-software-2/mutt-someone@somedomain-com-unable-to-attach-file-844315/

bugs.launchpad.net /ubuntu/+source/mutt/+bug/805613

相关内容