func match_cidr_list(string cl_addr, string cidr_list) returns number do set str1 substring(%cidr_list, 0, index(%cidr_list, "\n")-1) if index(%cidr_list, "\n") = 0 return 0 fi if match_cidr(%cl_addr, %str1) return 1 fi set str2 substring(%cidr_list, index(%cidr_list, "\n")+1, -1) return match_cidr_list(%cl_addr, %str2) done func massallocated_hit(string cl_addr, string ma_regexps) returns number do set str1 substring(%ma_regexps, 0, index(%ma_regexps, "\n")-1) if hostname %cl_addr matches %str1 return 1 fi if not index(%ma_regexps, "\n") = 0 set str2 substring(%ma_regexps, index(%ma_regexps, "\n")+1, -1) set ms_hit_tmp massallocated_hit(%cl_addr, %str2) if %ms_hit_tmp = 0 return 0 else return %ms_hit_tmp + 1 fi fi return 0 done func safe_send_mail (string msg, string eml) do catch failure do echo "%queue_id: WARNING: message from interceptor was not been sent to %eml." return done send_mail(%msg, %eml) done