0

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 msmtp mytmpmail | msmtp address@example.com 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 adress@ex.comit 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

4

1 回答 1

0

您的 MTA 是否在同一台机器上运行?如果是这样,您最好将退出代码传递回 procmail,并使用 procmail 的转发功能。

如果它不符合您的要求,为什么需要“发送到其他地方”?如果它是针对您公司的员工的,那么您在脚本中对 mutt 所做的事情应该可以正常工作。需要更多细节才能正确回答您的问题。

于 2011-07-31T15:53:24.190 回答