发送 MIME 文件
我需要对我在特定地址收到的每封电子邮件进行一些操作, 首先 ai 在 procmail 中制定了一条规则,并将邮件传输到 bash 文件中
| mybash.sh
在 bash 文件中,我将邮件保存在 tmp 文件夹中,它似乎是一个 MIME 文件,我可以像使用 mutt 一样打开邮件: mutt -f mytmpmail
我现在需要再次发送此邮件,但我尝试使用 msmtp mytmpmail | msmtp [电子邮件受保护]
但我收到的邮件中,MIME 邮件在正文中显示为文本,我尝试使用 mailx,结果是一样的。 使用 mutt -s "subject" -a mytmpmail [电子邮件受保护]
它显示为附件,但它仍然是一个文本文件... 我只需要“按原样”转发邮件,因为我提取了邮件的附件,如果附件不符合所需的规格,我需要将其发送到其他地方。
PS:对不起我的英语
i need to do some operation over each email i received on a specific adress,
first a i made a rule in procmail and pipe the mail in a bash file
| mybash.sh
In the bash file i save the mail in a tmp folder, it seem's to be a MIME file that i can open like a mail with mutt :mutt -f mytmpmail
I now need to send this mail again, but i tryed with msmtpmytmpmail | msmtp [email protected]
But i the received mail the MIME mail appear as text in the body, i tried with mailx and it was the same.
With mutt -s "subject" -a mytmpmail [email protected]
it appear as a attachment but it's still a text file...
I only need to forward the mail "as it" because i extract attachment of the mail and if attachment don't meet the required specification i need to send it elsewhere.
ps : sorry for my english
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 MTA 是否在同一台计算机上运行?如果是,您最好将退出代码传递回 procmail,并使用 procmail 的转发功能。
如果不符合您的要求,为什么需要“发送到其他地方”?如果是针对您公司的员工,那么您在脚本中使用 mutt 所做的事情应该可以正常工作。需要更多细节才能正确回答您的问题。
Is your MTA running on the same machine? If it is, you're likely better off passing exit codes back to procmail, and using procmail's forwarding capabilities.
Why do you need to "send it elsewhere" if it doesn't match your requirements? If it's for staff in your company, what you're doing with mutt within your script should work fine for that. Some more detail is needed to answer your question properly.