On 29/05/17 15:59, Hubro wrote:
> The problem with that is that you're passing all the mail file paths right in
> the command line. Say one path is 41 bytes (which they are on my system),
> filtering 100 000 mails results in 4,1 MB of paths passed to postcat as
> command line arguments, which is double the limit of my home desktop.

find "$(postconf -h queue_directory)/deferred/)" -type f -exec postcat
-e {} + | your_program | postsuper -d -

In the above find will put as many paths on the command line as will fit
and run multiple instances of postcat to make up the difference, so in
your case it would run postcat 2 or 3 times to get all the file paths
passed, then the output of the whole thing would go to your program and
the output of that to postsuper.

So running find once, postcat 2 or 3 times, your program once, postconf
once and postsuper once ... not too bad.


Peter

Reply via email to