procmail
[Top] [All Lists]

Re: formail -l problem

2004-04-20 04:42:18
On Mon, 19 Apr 2004, David W. Tamkin wrote:

Udi asked further,

How need feature like this?  Do you have an example for usage?

You'd usually use formail -l within procmail to customize the
logabstract, like this (and used this way, the string can include
variables, which will be evaluated when the trap is executed):

:0
* conditions
{
  LOGABASTRACT=off
  TRAP='formail -l "special string for this situation"'

  :0 flags
  delivery_action
}

or maybe this (not tested; if it works, variables in the string will be
evaluated when it is encountered):

:0
* conditions
{
  LOGABSTRACT=off
  LOG=`formail -l "some string here"`

  :0
  delivery_action
}

        Thanks David, I find that    `formail -l "$LOGNAME"`
        in procmailrc can be helpful in some cases when I want
        very short logging.


[about running  formail -l "string" -s < mbox  ]

At least the -s  do summerize, when you grep out the "Folder" linse.

By "grep out" do you mean that that's what you output or that that's
what you remove?  If you grep Folder:, it will be a very uninformative
summary, except for the sizes, because all the Folder: entries will be
the string you specified on formail's command line.  If you grep -v
Folder:, then the From_ and Subject: lines may be of some value (though
you'll lose the sizes).

        Actually I need the From_ and Subject only.

Bye,
 Udi




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

_______________________________________________
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>