procmail
[Top] [All Lists]

Re: copy attachment to disk

2005-03-02 04:27:21
On Wed, Mar 02, 2005 at 10:42:58AM +0200, Maracineanu Florian wrote:
How can I copy attachment from all mails to disk (/opt/copy).

You need to pipe the email to an external program to do this.

I tried the following .procmailrc but it saves all mail not only the 
attachment:

SHELL=/bin/sh
PATH="/usr/local/bin:/usr/bin:/usr/local/sbin:/bin:/sbin:/usr/sbin"

You shouldn't need to explicitly state a path except in very
unusual situations.  It's not recommended generally, as it
can cause problems that you'll then have to track down.

:0 HB

There is a procmail bug using the H up-top like that; don't
do it.

* ^To:omv(_dot_)*\(_at_)omvro\(_dot_)ro

You're highly unlikely to get email with no space after the To:
followed by the letter "o".  Also, @ doesn't need a quote.

* ^Content-Disposition: attachment;
*filename=".*\.(cmx)"
$CALE

Try this:

  :0
  * ^To:(_dot_)*omv(_at_)omvro\(_dot_)ro
  * B ?? filename=".*\.cmx"
  | some_proggy_such_as_reformime_or_munpack -any_flags

-- 
dman

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>