#] #] ********************* #] loaddefs link d_Qndfs 'virus - clamscan output filtering of viruses found.ndf' # - select "virus lines" in clamscan output, and append to a "virus found" file Operation: clamscan_filter # 22Jan2012 - Have not really started to adapt from another application (Ijust changed the operator name!) f_clamAV := 'virus - clamscan output filtering of viruses found.ndf' ; loaddefs_start f_clamAV ; #**************************** # List of operators, generated with : # $ cat "$d_Qndfs""virus - clamscan output filtering of viruses found.ndf" | grep "^#]" | sed 's/^#\]/ /' # ********************* loaddefs link d_Qndfs 'virus - clamscan output filtering of viruses found.ndf' clamscan_filter IS OP filepath - #************************ # DEBUGGING tools # Debugging - problem with trapping faults: From: /media/bill/SWAPPER/Qnial/v6testing/0a_notebook.txt 7. Command line options OK -s supresses fault triggering # IF flag_writescreen THEN Writescreen routine ; ENDIF ; routine := 'routine' ; # IF flag_break THEN BREAK ; ENDIF ; flag_writescreen := o ; #flag_break := l ; % Set this to track things or not at break point ; f := 'virus - clamscan output filtering of viruses found.ndf' ; # lf IS loaddefs '/media/bill/SWAPPER/Qnial/MY_NDFS/Thunderbird - delete binary attachments.ndf' #************************ # SETUP, initial assignments # Libraries (not needed here?...) library "stripblk library "findstri IF not in "string_split_by_string (EACH first symbols 0) THEN set "sketch; loaddefs '/media/bill/SWAPPER/Qnial/MY_NDFS/strings.ndf' 0; ENDIF; # Character codings chrcd_CR := 13 ; chrcd_LF := 10 ; #************************ # State descriptions and globals for this workspace "Thunderbird - delete binary attachments.NDF" IF flag_debug THEN write 'loading clamscan_filter' ; ENDIF ; #] clamscan_filter IS OP filepath - clamscan_filter IS OP filepath { NONLOCAL count_total_all count_total_renamed dir_attchs dir_email dir_emails_old dir_emails_old_root fil_log_host fil_log_nial fot_log_host fot_log_nial mime_name ; Dater := Process_timestamp ; mime_name := link dir_attchs 'MIME.txt' ; % ; count_total_all := 0 ; count_total_renamed := 0 ; fot_log_nial := open (link dir_attchs fil_log_nial) "a ; fot_log_host := link dir_attchs fil_log_host ; fot_log_nial EACHRIGHT writefile ('' '' '******************************************************************' (link 'emailer - run at: ' timestamp ) '' ) ; EACH host EACH link CART (solitary link ('echo >>"' fot_log_host '" ')) ('" "' '" "' '"******************************************************************"' (link '"emailer - run at: ' timestamp '"') '" "') ; dir_emails_old := link dir_emails_old_root (rest Dater) ' old mail folders/' ; host_return := host link 'mkdir >>"' fot_log_host '" "' dir_emails_old '"' ; % ; EACH host ( EACH link CART (solitary link ('mkdir >>"' fot_log_host '" "' dir_emails_old)) (link EACH front EACH unfold_dirs target_folders) (solitary '"') ) ; EACH Attach_del target_folders ; % ; fot_log_nial EACHRIGHT writefile '' 'Totals for all attachments saved: ' (link 'count_total_mailbxs: ' (string count_total_all )) (link 'count_total_attchSaved: ' (string count_total_renamed)) ; close fot_log_nial ; } #************************ # emailer - ERROR TRACKING # 000 pe22Jun10 probably fiename problem.... # void single solitary #************************ # emailer - DEVELOPMENT ACTIONS AT START/CLOSE OF DAY # 22Aug10 15:56 run emailer on "Travel.sbd/MBNA Travel Insurance.sbd/" loaddefs_ended f_clamAV ; # enddoc