On Mon, Jul 10, 2006 at 03:30:54PM -0700, Lev Lvovsky wrote:
I have formail setting the status of certain messages as read via
"formail -I Status: RO", however procmail seems to treat formail
as a folder, when it hits this particular recipe:
:Ofh:
* ^X-Spam-Status.*YES
* !^X-Spam-Status.*NO
|formail -I Status: RO
it logs the following:
----
From ithamar(_at_)exalumnos(_dot_)com Wed Jul 5 11:27:09 2006
Subject: =?windows-1251?B?UmU6IM7x4u7h7ubk5e3o5SDu8iDu7
+vg8vsgzcTRIOgg8uDs7ubl
Folder: formail -I Status:
RO 838
----
if I append to a folder in the formail command, everything works,
however I notice that this differs from the examples shown in the
procmailex man page.
any reason for this?
Your diagnosis of the problem isn't quite right. Procmail isn't
treating formail as a folder, despite that rather cryptic log message.
Moreover, the recipe you show above cannot be the one generating that
log message.
First, your recipe above has the letter "o" where you would need a
zero ("0") to start a procmail recipe on the initiating line.
If we run your faulty syntax against procmail, we get log messages
such as
procmail: Skipped "Ofh:"
procmail: Match on "|formail -I Status: RO"
procmail: Incomplete recipe
Since you didn't show such a log entry, I conclude that you hand-typed
the above recipe into your message and introduced a typo, but that
it is not identical to the recipe you're having trouble with.
We can't help you easily if you don't give exactly replicated
recipes, etc.
Second, the problem is that you have not used quotation marks around
the formail argument that contains whitespace. You need to say:
|formail -I "Status: RO"
or something similar.
However, if I fix the "zero" problem at the head of the recipe
but still leave out the quotation marks to formail exactly as
you show above, I still get a log message quite unlike the one
you list. I get:
procmail: Couldn't determine implicit lockfile from "formail"
procmail: Locking ".lock"
procmail: Executing "formail,-I,Status:,RO"
Usage: formail [-vbczfrktqY] [-D nnn idcache] [-p prefix] [-l folder]
[-xXaAiIuU field] [-R ofield nfield]
Or: formail [+nnn] [-nnn] [-bczfrktedqBY] [-D nnn idcache] [-p prefix]
[-n [nnn]] [-m nnn] [-l folder] [-xXaAiIuU field] [-R ofield nfield]
-s [prg [arg ...]]
procmail: Non-zero exitcode (64) from "formail"
procmail: Rescue of unfiltered data succeeded
procmail: Unlocking ".lock"
procmail: Locking "devil.lock"
Since that is nothing like what you show, I again conclude that you
are pasting in inaccurate information into your query to the list.
Please don't do that!
If I fix the quotation marks around the formail statement, everything
works fine.
You should use the "w" flag on the recipe with the "f" flag, however.
Finally, your conditions seem silly to me. Why have a condition that
says to look for a "YES", then have a second condition that says to
look for the absense of a "NO"? I would think you could do the whole
thing with only one condition, better formulated.
dman
____________________________________________________________
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