procmail
[Top] [All Lists]

RE: procmail Efficiency Question

1999-03-25 04:11:39
On Wed, 24 Mar 1999 11:12:46 -0500, "Banerjee, Tapas"
<Tapas(_dot_)Banerjee(_at_)gs(_dot_)com> wrote:
     `cat monalisa_mails|sendmail -t` it reads first header
     and sends all stored mail to same person, which was not the purpose.

formail -s sendmail -t <monalisa_mails

Perhaps you should read up on the "Useless Use of cat(1)" as well.
<http://www.iki.fi/era/unix/award.html>

      Is it possible to add any unique no, which will be
autoincremented, or random number attached to the file, so that I
can unquely create mail file and send them on batch?

Easily. Save the messages to a directory and Procmail will take care
of the numbering for you.

    :0
    * ... your criteria here ...
    {
        :0fhw
        | formail header rewriting stuff here, if you still want it

        :0
        monalisa/.
    }

where monalisa is a directory you created for these messages. (I
believe you could still use a variable for this folder name if you
want to.) But you can collect them in an mbox file just fine and use
formail to split it back up again as outlined above if that's the only
reason you want this.

/* era */

-- 
.obBotBait: It shouldn't even matter whether     <http://www.iki.fi/era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>
 * Sign the European spam petition! <http://www.politik-digital.de/spam/en/> *

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