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

Clem
  • 1
  • 1

1 Answers1

0

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.

ammotent
  • 3
  • 1