procmail
[Top] [All Lists]

set a different exitcode for each mailbox

2007-09-19 16:03:31
Hello,

I have a procmailrc file with the standard structure:

-------------------------------------------
Recipe 1
        if (condition)
        file to folder_1

Recipe 2
        if (another condition)
        file to folder_2
....

DEFAULT_FOLDER

--------------------------------------------

I'm calling procmail from a shell script which scans a maildir, on one
message every time . I need the script to know to which folder
procmail delivered a recipe. If I understand correctly, the right or
simplest way to do it is setting EXITCODE, isn't it?

The question is, what is the right syntax to add an EXITCODE statement
to a generic recipe, right before or after the destination folder?
Simply adding curly braces around the folder name at the end of the
recipe, that is going, for example, from:

------------------------------------------------------------
#some processing and checking.  if the preceeding conditions matched,
#then file this message in folder_N

:0A:

folder_n
-----------------------------------------------------------

to:

------------------------------------------------------------
#some processing and checking.  if the preceeding conditions matched,
#then file this message in folder_N

:0A:

        {
        EXITCODE=N
        folder_n
        }
-----------------------------------------------------------

At least, this is what I understand from procmailex. Am I right?

TIA,
        Marco

-- 
Help *everybody* love Free Standards and Free Software
http://digifreedom.net/
____________________________________________________________
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