procmail
[Top] [All Lists]

Re: Mailstat "Folders" Not Always Folders?

2002-01-24 14:55:39
On Thu, 24 Jan 2002, David W. Tamkin wrote:

When I explained to Kenneth Blackwell,

That way the folder's name will get into the logfile.

He responded,

| Many thanks for your response. I'm not sure that you mean that
| *only* the folder's name will get into the logfile, and not the rest of
| the (truncated) line.

No, not just the foldername, but as much of the line as will fit will get
into the logfile and thus into mailstat's output; however, but if it's
truncated, the folder's name will still come through, and you'll be able to
see it.  Isn't the problem that the foldername wasn't present at all?

| When I substitute the name of my procmail folder
|
| | >> .procmail formail-command with lots of parameters
|
| I still get the log and mailstat reading the action command literally. The
| whole truncated line is still the folder name.

Yes; for the logfile, "Folder:" means wherever final delivery went.

| I used parentheses as you have them (but no semicolons) and still get the
| literal truncated line as the folder name. Any idea what I'm doing wrong?

That's not wrong.  I was just suggesting a way to get the folder's name into
view.

| In the verbose log there's a complaint when I add a "/" before the folder
| name or even a path:
|
| /bin/sh: /.procmail: cannot create

That's because you tried creating a file named /.procmail in the system's
root directory, where apparently you, or at least your procmail process,
doesn't have write permission.

| It would appear that I'm asking more than procmail is prepared to
| give me. If that's so, in the log and in mailstat "Folder:" might be
| renamed "Destination:".

Your second post gives me an impression that your post didn't: that you want
the "Folder:" line to name the folder, and only the folder, and not the
command that wrote to it.  In that case (and watch your `b' and `h' flags
when you use this syntax):

 :0 f # and probably w, and maybe other flags
 * conditions
 | command string without ">> foldername"
  :0A: # or possibly :0a: depending on circumstances
  foldername

Then the filtering recipe will not be logged, and the delivering recipe
(which does get logged) will give you only the foldername in the
logabstract, $LASTFOLDER will be only the foldername if you refer to it in a
TRAP, and mailstat will find only the foldername in the logfile.

        ":0 f" and ":0A:/foldername" added to my recipe (actually Bob
Taylor's) now produce foldername-only mailstats. Again, many thanks and
especially David. For the foldername I've selected ".spamcanceller". This
folder doesn't exist. That doesn't seem to be a problem. It's apparently
enough for it to exist in name only.

                          KENNETH BLACKWELL


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