[pmmail-list] Moving Emails via REXX

Kris Sorem Sr pmmail-list@blueprintsoftwareworks.com
Sun, 28 Oct 2001 08:53:58 -0800 (PST)


My reply to message from Dr. Martin R. Hadam sent on
Sat, 27 Oct 2001 21:29:19 +0100. You wrote:

 What I was looking for is a solution to "branch" execution of commands
in a PMMail filter, e.g. depending on a REXX return code. 

 I can always generate a logfile with all the relevant file names of
improperly processed files, which acts as kind of a semaphore for
another email processing demon. This is the way I'm going to embark on.
But again, I was more interested in exploiting PMMail's filter
capabilities - but it appears that it's impossible to do what I'm
looking for.

PMMail's program tag may be your solution. This ICSL tag like the header
tag and other tags can be used in filtering. From the ICSL help file for
program tag:

<quote>

  The P or PROGRAM Tag: 

  What this tag does is it allows you to use the return 
  value of an externally called program to determine 
  whether or not the filter criterion have been met or 
  not.  The tag is used by telling the ICSL interpreter 
  the name of the program you want to call (as 
  defined below).  When the filter is run, your 
  program will be called and passed 2 command line 
  parameters.  The first is the filename (relative 
  pathing from the PMMail Root directory) of the 
  e-mail, and the second is the file where the return 
  value or information should be written to.  That file 
  passed as the second parameter will be the file that 
  is searched and the search string will be compared 
  against. 

  The program tag is the only tag that has it's own 
  unique syntax.  The sytnax is as follows: 

  PROGRAM<.path and filename of program>[.Flags] = 
  "String" 

  The pointy braces (< and >) must be placed around 
  the program name.  Also, the path and the program 
  name itself cannot have any spaces in it.  This is 
  very important, otherwise, the program will not be 
  correctly run.  The only valid evaluator for this tag 
  is the equals (=) sign. 

  This is a very powerful tag and can make the 
  already robust filter system even more robust by 
  incorporating external programs which can 
  manipulate and generate information above and 
  beyond what PMMail can do.   

  All predefined fields (including all header Fields) are 
  searched without regard to case.   

</quote>

Give it a try or check it out.
--
JMO, 
/s/~Kris
-------------------------------+------------------------------------------



- pmmail-list - The PMMail Dicussion List ---------------------------
To POST to the list, send your message to:
pmmail-list@blueprintsoftwareworks.com

To UNSUBSCRIBE, send a message to mdaemon@bmtmicro.com with the first 
line of the message body being...
UNSUBSCRIBE pmmail-list@blueprintsoftwareworks.com
---------------------------------------------------------------------