/****************************************************************/ /* Sample filter for use with Weasel */ /* */ /* This filter takes a copy of the incoming message and */ /* stores the copy in an 'Archive' subdirectory. */ /* */ /* Author: Peter Moylan (peter@ee.newcastle.edu.au) */ /* Started: 26 October 2000 */ /* Last revised: 26 October 2000 */ /* */ /* Installation: */ /* Put this file in the directory containing WEASEL.INI */ /* Put its name in the 'Options' page in Setup. */ /* Create a subdirectory 'Archive' under the mail root. */ /* Weasel needs to be restarted to recognise the change. */ /* */ /****************************************************************/ CALL RxFuncAdd SysLoadFuncs, rexxutil, sysloadfuncs CALL SysLoadFuncs PARSE ARG messagefile userlist /* Work out where the archive directory is. */ Nul = '00'X DestDir = SysIni('WEASEL.INI', '$SYS', 'MailRoot') j = POS(Nul,DestDir) IF j > 0 THEN DestDir = LEFT(DestDir, j-1) DestDir = STRIP(DestDir) DestDir = TRANSLATE(DestDir, '\', '/')||'Archive' /* Generate a file name for the copy. */ DestFile = SysTempFileName( DestDir||'\?????.ARC' ) /* Do the copy. */ '@COPY 'messagefile', 'DestFile /* Return to Weasel with an 'OK' return code. */ RETURN 0