procmail
[Top] [All Lists]

Re: Forward only attachments, Stripping first n lines of the body

2003-03-28 11:33:09
M Samavi <msamavi(_at_)firmsweb(_dot_)com> writes:
Can any one suggest a recipe for forwarding only the attachments to a new
email address?

:0
* ^MIME-Version:
{
  WORKSPACE=$HOME/tmp/`date "+%s"`
  TRAP='rm -r $WORKSPACE'
  :0w
  |( mkdir $WORKSPACE ; munpack -C $WORKSPACE ; find $WORKSPACE -mindepth 1 
-not -name '*.desc' -exec mpack -s '{}' '{}' new(_at_)email(_dot_)com ';' )
  :0e
  { TRAP # cancel cleanup if there was an error }
}


Can any one suggest a recipe to strip the first n lines (e.g. 7 lines) of
the message body then forward it to a new email address?

:0b
| sed '1,7d' | mail -s "decapitated email for you" new(_at_)email(_dot_)com


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>
  • Re: Forward only attachments, Stripping first n lines of the body, Jeff Orrok <=