Title: Message
Hi,
 
Since this doesn't appear to ever be offered as part of Declude, I took half an hour and threw a few lines of code together. 
 
If you have a small subset of messages that you hold but for which you are worried about occasional false positives being held, then you can use the HOLD and the ALERT actions to send out a notification to the apparent sender.
 
In the your alert.eml template, you can offer a link to:
 
 
which will release the held email for delivery.
 
Here's the necessary ASP code for "Req.asp", which you need to run on an IIS server with write access to your Imail Spool and Declude "hold" folders. (Use at your own risk and to whatever extent you like. No warranties!)
 
 Server.ScriptTimeout = 10;
 Response.Buffer = true;
 Response.CacheControl = "Private";
 Response.Expires = -1;
 
// ----------------------------------------------------------------------------
//  Global Variables
// ----------------------------------------------------------------------------
 
 var strSpoolPath = "C:\\IMail\\Spool\\";
 var strHoldPath = strSpoolPath + "Spam\\";
 
 var qQueueID = '';
 var reQueueID = /^D\w+\.\w{3}$/i;
 
// ----------------------------------------------------------------------------
//  Get Queue ID from QueryString
// Qualify valid spool file name format
// ----------------------------------------------------------------------------
 
 if ( Request.QueryString("Q").Count > 0 )
  {
  qQueueID = ( new String( Request.QueryString("Q") ) ).valueOf();
  }
 
 if ( !reQueueID.test( qQueueID ) )
  {
  // Format is not "Dxxxxxxxxx.xxx"
  Response.Write( "Error: The string '" + escape( qQueueID ) + "' is not in the expected Queue ID format.<br>\n" );
  Response.End();
  }
 
 var strQueueID_Hdr = "Q" + qQueueID.substr( 1 );
 
// ----------------------------------------------------------------------------
//  Move Message File Back to Queue
// ----------------------------------------------------------------------------
 
 var objFS = new ActiveXObject("Scripting.FileSystemObject");
 
 var strSource1 = strHoldPath + qQueueID;
 var strTarget1 = strSpoolPath + qQueueID;
 
 var strSource2 = strHoldPath + strQueueID_Hdr;
 var strTarget2 = strSpoolPath + strQueueID_Hdr;
 
 // validate status of source and target files
 if  ( !objFS.FileExists( strSource1 ) )
  {
  Response.Write( "Error: Message data file not found!<br>\n" )
  Response.End();
  }
 else if ( !objFS.FileExists( strSource2 ) )
  {
  Response.Write( "Error: Message header file not found!<br>\n" )
  Response.End();
  }
 else if ( objFS.FileExists( strTarget1 ) )
  {
  Response.Write( "Error: Message data file already exists in queue!<br>\n" )
  Response.End();
  }
 else if ( objFS.FileExists( strTarget2 ) )
  {
  Response.Write( "Error: Message header file already exists in queue!<br>\n" )
  Response.End();
  }
 
 // move and rename file
 try
  {
  objFS.MoveFile( strSource1, strSpoolPath );
  objFS.MoveFile( strSource2, strSpoolPath );
  Response.Write( "Success: Message ID '" + qQueueID + "' has been re-queued for delivery.<br>\n" );
  }
 catch(e)
  {
  Response.Write( "Error during moving file: " + e + "<br>\n" + ( e.number & 0xFFFF ) + ", " + e.description + "<br>\n" );
  }
 
 objFS = null;
 
Best Regards
Andy Schmidt

H&M Systems Software, Inc.
600 East Crescent Avenue, Suite 203
Upper Saddle River, NJ 07458-1846

Phone:  +1 201 934-3414 x20 (Business)
Fax:    +1 201 934-9206

http://www.HM-Software.com/

Reply via email to