procmail
[Top] [All Lists]

Re: copy attachments to two destinations

2013-11-12 15:45:21
On Tue, Nov 12, 2013 at 11:53 AM, Eric Smith <es(_at_)fruitcom(_dot_)com> wrote:
Hi

I want to extract attachments from each email to two target
folders. The following recipe gives this error:
:0f
| /usr/bin/uudeview -i +a  -p /home/eric/ -e .html -
:0f
|  /usr/bin/uudeview -i -p /someplace_else -e .html -

You don't want the "f" flag.  "Consider the pipe as a filter" means
that procmail will capture the standard output of the pipe and replace
the message contents with it.  Thus with the above, you'll have a
complete message only for the first pipe, and most likely an empty
message for the second pipe.

You want the "c" flag on the first recipe, and no flags at all on the
second one, though you might want to consider establishing a locking
protocol if attachments having the same name might arrive in two
different messages.
____________________________________________________________
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