# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. astaro = { plugin_version = "1.1.1" info.1.manfacturer = "Astaro" info.1.device = "Mail Security" info.1.version.1 = "ASG 110, 120, 220, 320, 425, 525, 625" # ????-??-?? - ??? - 1.0 - Initial creation. # 2010-02-25 - KBB - 1.1 - Added support for single space when uncaptured optional field is missing from To line. # The result of not allowing this was rejection of most To lines (=> lines). # 2010-10-12 - 1.1.1 - MSG - Edited info lines. # The name of the log format log.format.format_label = "Astaro SMTP Proxy Log Format" log.miscellaneous.log_data_type = "mail_server" log.miscellaneous.log_format_type = "proxy_server" # The log is in this format if any of the first ten lines match this regular expression log.format.autodetect_regular_expression = "\\]: [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] exim.*daemon started" # The format of dates and times in this log log.format.date_format = "yyyy-mm-dd" log.format.time_format = "hh:mm:ss" # Entries are called messages statistics.miscellaneous.entry_name = "messages" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { date = { label = "$lang_stats.field_labels.date" type = "date" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # date time = { label = "$lang_stats.field_labels.time" type = "time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # time from = { label = "$lang_stats.field_labels.from" type = "flat" index = 0 subindex = 0 } # from to = { label = "$lang_stats.field_labels.to" type = "flat" index = 0 subindex = 0 } # to protocol = { label = "$lang_stats.field_labels.protocol" type = "flat" index = 0 subindex = 0 } # protocol type = { label = "$lang_stats.field_labels.type" type = "flat" index = 0 subindex = 0 } # type reason = { label = "$lang_stats.field_labels.reason" type = "flat" index = 0 subindex = 0 } # reason remote_hostname = { label = "$lang_stats.field_labels.remote_hostname" type = "flat" index = 0 subindex = 0 } # remote_hostname remote_ip = { label = "$lang_stats.field_labels.remote_ip" type = "flat" index = 0 subindex = 0 } # remote_ip size = { label = "$lang_stats.field_labels.size" type = "size" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # size } # log.fields # # Log Parsing Filters log.parsing_filters = { # Parse out the date, time, key 1 = { label = "1" comment = "" value = "collect_fields_using_regexp('\\\\]: ([0-9]+-[0-9]+-[0-9]+) ([0-9]+:[0-9]+:[0-9]+) ([^ ]+) [=<>]+ ', 'date,time,*KEY*')" } # 1 # Parse => lines 2 = { label = "2" comment = "" value = ` if (matches_regular_expression(current_log_line(), '\\\\]: [0-9-]+ [0-9:]+ ([^ ]+) => ([^ ]+) (.* )?R=([^ ]+) T=([^ ]+) H=([^ ]+) \\\\[([0-9.]+)\\\\]')) then ( v.key = $1; set_collected_field(v.key, 'to', $2); set_collected_field(v.key, 'reason', $4); set_collected_field(v.key, 'type', $5); set_collected_field(v.key, 'remote_hostname', $6); set_collected_field(v.key, 'remote_ip', $7); ); ` } # 2 # Parse <= lines 3 = { label = "3" comment = "" value = "collect_fields_using_regexp('\\\\]: [0-9-]+ [0-9:]+ ([^ ]+) <= ([^ ]+) H=([^ ]+) \\\\[([0-9.]+)\\\\] P=([^ ]+) S=([0-9]+)', '*KEY*,from,remote_hostname,remote_ip,protocol,size')" } # 3 # Accept on Completed line 4 = { label = "4" comment = "" value = "accept_collected_entry_using_regexp('\\\\]: [0-9-]+ [0-9:]+ ([^ ]+) Completed', false)" } # 4 } # 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 from = { label = "$lang_stats.field_labels.from" log_field = "from" type = "string" suppress_top = 0 suppress_bottom = 2 } # from to = { label = "$lang_stats.field_labels.to" log_field = "to" type = "string" suppress_top = 0 suppress_bottom = 2 } # to protocol = { label = "$lang_stats.field_labels.protocol" log_field = "protocol" type = "string" suppress_top = 0 suppress_bottom = 2 } # protocol type = { label = "$lang_stats.field_labels.type" log_field = "type" type = "string" suppress_top = 0 suppress_bottom = 2 } # type reason = { label = "$lang_stats.field_labels.reason" log_field = "reason" type = "string" suppress_top = 0 suppress_bottom = 2 } # reason remote_hostname = { label = "$lang_stats.field_labels.remote_hostname" log_field = "remote_hostname" type = "string" suppress_top = 0 suppress_bottom = 2 } # remote_hostname remote_ip = { label = "$lang_stats.field_labels.remote_ip" log_field = "remote_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # remote_ip } # 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 # How the reports should be grouped in the report menu report_groups = { date_time_group = "" from = true to = true protocol = true type = true reason = true remote_hostname = true remote_ip = true } # report_groups } # create_profile_wizard_options not_supported = { individualhosts = true sessions = true visitors = true pageviews = true bandwidth = true } # not_supported } # astaro