mail_stripper = { # The name of the log format log.format.format_label = "MailStripper Log Format" log.miscellaneous.log_data_type = "mail_server" log.miscellaneous.log_format_type = "mail_server" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "^[A-Z][a-z][a-z] [0-9]+ [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \\[[0-9]+\\]: Connection from [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+$" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # The format of dates and times in this log log.format.date_format = "mmm dd" log.format.time_format = "auto" # Log fields log.fields = { date = { label = "$lang_stats.field_labels.date" type = "date" } # date time = { label = "$lang_stats.field_labels.time" type = "time" } # time source_ip = { label = "$lang_stats.field_labels.source_ip" type = "host" hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" type = "flat" } # source_port blacklist = { label = "$lang_stats.field_labels.source_blacklist" type = "flat" } # blacklist action = { label = "$lang_stats.field_labels.source_action" type = "flat" } # action sender = { label = "$lang_stats.field_labels.sender" type = "hierarchical" hierarchy_dividers = "@" left_to_right = false leading_divider = "false" } # sender recipient = { label = "$lang_stats.field_labels.recipient" type = "hierarchical" hierarchy_dividers = "@" left_to_right = false leading_divider = "false" } # recipient } # log.fields # Log Parsing Filters log.parsing_filters = { # Parse the date/time parse = { label = "parse" comment = "" value = " if (matches_regular_expression(current_log_line(), '^([A-Z][a-z][a-z] [0-9]+) ([0-9]+:[0-9]+:[0-9]+) \\\\[([0-9]+)\\\\]: (.*)$')) then ( volatile.key = $3; set_collected_field(volatile.key, 'date', $1); set_collected_field(volatile.key, 'time', $2); volatile.message = $4; if (matches_regular_expression(volatile.message, '^Connection from ([0-9.]+):([0-9]+)')) then ( set_collected_field(volatile.key, 'source_ip', $1); set_collected_field(volatile.key, 'source_port', $2); ); else if (volatile.message eq 'Sender email address accepted') then set_collected_field(volatile.key, 'action', 'Accepted'); else if (volatile.message eq 'Session terminated normally by foreign host.') then accept_collected_entry(volatile.key, false); else if (matches_regular_expression(volatile.message, '^Blacklisted sender email address <([^>]+)>')) then set_collected_field(volatile.key, 'sender', $1); else if (matches_regular_expression(volatile.message, '^Denied sender tried to send to <([^>]+)>')) then ( set_collected_field(volatile.key, 'recipient', $1); set_collected_field(volatile.key, 'action', 'Denied'); ) else if (matches_regular_expression(volatile.message, '^(.*) returned [0-9.]+$')) then set_collected_field(volatile.key, 'blacklist', $1); ) " } # parse } # log.parsing_filters # Database fields database.fields = { date_time = { label = "$lang_stats.field_labels.date_time" log_field = "date_time" type = "string" suppress_top = 0 suppress_bottom = 3 display_format_type = "date_time" } # date_time day_of_week = { label = "$lang_stats.field_labels.day_of_week" log_field = "day_of_week" type = "string" suppress_top = 0 suppress_bottom = 2 display_format_type = "day_of_week" } # day_of_week hour_of_day = { label = "$lang_stats.field_labels.hour_of_day" log_field = "hour_of_day" type = "string" suppress_top = 0 suppress_bottom = 2 display_format_type = "hour_of_day" } # hour_of_day source_ip = { label = "$lang_stats.field_labels.source_ip" log_field = "source_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_ip source_port = { label = "$lang_stats.field_labels.source_port" log_field = "source_port" type = "string" suppress_top = 0 suppress_bottom = 2 } # source_port location = { label = "$lang_stats.field_labels.location" log_field = "location" type = "string" suppress_top = 0 suppress_bottom = 2 } # location blacklist = { label = "$lang_stats.field_labels.blacklist" log_field = "blacklist" type = "string" suppress_top = 0 suppress_bottom = 2 } # blacklist sender = { label = "$lang_stats.field_labels.sender" log_field = "sender" type = "string" suppress_top = 0 suppress_bottom = 3 } # sender recipient = { label = "$lang_stats.field_labels.recipient" log_field = "recipient" type = "string" suppress_top = 0 suppress_bottom = 3 } # recipient action = { label = "$lang_stats.field_labels.action" log_field = "action" type = "string" suppress_top = 0 suppress_bottom = 2 } # action } # database.fields database.numerical_fields = { messages = { label = "$lang_stats.field_labels.messages" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # messages } # database.numerical_fields log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'messages = 1;' } # mark_entry } # log.filters create_profile_wizard_options = { date_time_tracking = true host_tracking = true # How the reports should be grouped in the report menu report_groups = { date_time_group = "" day_of_week = true hour_of_day = true action = true source_ip = true source_port = true location = true blacklist = true sender = true recipient = true } # report_groups } # create_profile_wizard_options } # mail_stripper