gmssmtp = { # An "S3" log format recognises logs that require "parsing filters" # # # If parse_only_with_filters is true, Sawmill uses the log_parsing_filters to parse the log; # and other parsing options are ignored. # ======================================================================== # # ####################### # # # LOG FORMAT OPTIONS # # # ####################### # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+lff # The name of this format # Format log_file_format value log.format.format_label = "GMS SMTP Log Format" # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+ldt # This log is the following type #Format: log_data_type value log.miscellaneous.log_data_type = "mail_server" log.miscellaneous.log_format_type = "mail_server" # Determine what types of data this log file will support. # Un-comment the type below to disable this in the database # # Format: $notsupported value # $notsupported daybyday # $notsupported individualhosts # $notsupported sessionpages # $notsupported hits # $notsupported bandwidth # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+tbaq # if there are square brackets around some fields (date/time) # you can specify to have this treated as one field # Format: treat_brackets_as_quotes true|false log.format.treat_brackets_as_quotes = "false" # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+ldf # The format of dates in this log # Format: log_date_format value log.format.date_format = "dd/mmm/yyyy" # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+ltf # The format of times in this log # Format: log_time_format value log.format.time_format = "hh:mm:ss" # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+en # The name of an entry in this log # Format: entry_name value statistics.miscellaneous.entry_name = "email" # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+lfare # We use this to recognise the format and "auto-detect". # Format: log_format_autodetect_regular_expression value log.format.autodetect_regular_expression = "^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\.[0-9]+ [A-Z] [0-9]+ [0-9]+ .*$" # http://www.sawmill.net/cgi-bin/sawmilldocs?ho+powf # This template is for those formats that require parsing filters # so is set to "true" as default # Format: parse_only_with_filters ( true | false ) 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 = true leading_divider = "false" } # date time = { label = "$lang_stats.field_labels.time" type = "time" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = true leading_divider = "false" } # time sender = { label = "$lang_stats.field_labels.sender" type = "hierarchical" index = 0 subindex = 0 hierarchy_dividers = "@" left_to_right = false leading_divider = "false" } # sender recipient = { label = "$lang_stats.field_labels.recipient" type = "hierarchical" index = 0 subindex = 0 hierarchy_dividers = "@" left_to_right = false leading_divider = "false" } # recipient forwarded_recipient = { label = "$lang_stats.field_labels.forwarded_recipient" type = "hierarchical" index = 0 subindex = 0 hierarchy_dividers = "@" left_to_right = false leading_divider = "false" } # forwarded_recipient bytes = { label = "$lang_stats.field_labels.bytes" type = "size" index = 0 subindex = 0 hierarchy_dividers = "" left_to_right = false leading_divider = "false" } # bytes content_scan = { label = "$lang_stats.field_labels.content_scan" type = "flat" index = 0 subindex = 0 } # content_scan fail_reason = { label = "$lang_stats.field_labels.fail_reason" type = "flat" index = 0 subindex = 0 } # fail_reason remote_server_ip = { label = "$lang_stats.field_labels.remote_server_ip" type = "flat" index = 0 subindex = 0 } # remote_server_ip remote_server_hostname = { label = "$lang_stats.field_labels.remote_server_hostname" type = "flat" index = 0 subindex = 0 } # remote_server_hostname local_server_hostname = { label = "$lang_stats.field_labels.local_server_hostname" type = "flat" index = 0 subindex = 0 } # local_server_hostname service = { label = "$lang_stats.field_labels.service" type = "flat" index = 0 subindex = 0 } # service } # log.fields ####################### # # # # ####################### # # Log Parsing Filters log.parsing_filters = { # 1 Parse out the date/time (starts) 1 = { label = "1" comment = "" value = "collect_fields_using_regexp('^(SMTP) ([0-9]+ [A-Z][a-z][a-z] [0-9]+) ([0-9:]+)\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+)', 'service,date,time,*KEY*')" } # 1 # 2 Parse out the connection from lines - remote connection 2 = { label = "2" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) Connection from \\\\[([^]]*)\\\\] \\\\[[^]]*\\\\]$', '*KEY*,remote_server_ip')" } # 2 # 3 Parse out the server hostnames 3 = { label = "3" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) 250 ([a-z][^ ]*) ([^ ]*)$', '*KEY*,local_server_hostname,remote_server_hostname')" } # 3 # 4 Parse out the MAIL FROM lines 4 = { label = "4" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) MAIL FROM: *<([^>]*)>$', '*KEY*,sender')" } # 4 # 5 Parse out the RCPT TO lines 5 = { label = "5" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) RCPT TO: *<([^>]*)>$', '*KEY*,recipient')" } # 5 # 5 Parse out the "Forward to" lines 6 = { label = "6" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) [0-9.]* [^ ]* [^ ]* Forward to ([^$]*)$', '*KEY*,forwarded_recipient')" } # 6 # 6 Parse out the size 7 = { label = "7" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) [^ ]* [^ ]* [^@]*@[^ ]* [^ ]* [^@]*@[^ ]* [^ ]* [^ ]* ([0-9]*)$', '*KEY*,bytes')" } # 7 # 7 Parse out the content scan results 8 = { label = "8" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) [^ ]* [^@]*@[^ ]* [^@]*@[^ ]* Content scan failure - ([^$]*)$', '*KEY*,content_scan')" } # 8 # 8 Parse out the Failed * lines - failure 9 = { label = "9" comment = "" value = "collect_fields_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) [^ ]* [^ ]* [^ ]* Reject with \\\\\"([^\"]*)\\\\\" [^ ]* [^$]*$', '*KEY*,fail_reason')" } # 9 # 9 Accept a collected entry 10 = { label = "10" comment = "" value = "accept_collected_entry_using_regexp('^SMTP [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) [0-9.]* Remote disconnected - no data$', false)" } # 10 # 10 Accept a collected entry 11 = { label = "11" comment = "" value = "accept_collected_entry_using_regexp('^[A-Z]+ [0-9]+ [A-Z][a-z][a-z] [0-9]+ [0-9:]+\\\\.[0-9]+ [A-Z] [0-9]+ ([0-9]+) QUIT$', false)" } # 11 } # log.parsing_filters ############################### # # # # ############################### # See http://www.sawmill.net/cgi-bin/sawmilldocs?ho+docs-hierarchies # for information about hierarchies. # 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 service = { label = "$lang_stats.field_labels.service" log_field = "service" type = "string" suppress_top = 0 suppress_bottom = 2 } # service 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 forwarded_recipient = { label = "$lang_stats.field_labels.forwarded_recipient" log_field = "forwarded_recipient" type = "string" suppress_top = 0 suppress_bottom = 3 } # forwarded_recipient content_scan = { label = "$lang_stats.field_labels.content_scan" log_field = "content_scan" type = "string" suppress_top = 0 suppress_bottom = 2 } # content_scan fail_reason = { label = "$lang_stats.field_labels.fail_reason" log_field = "fail_reason" type = "string" suppress_top = 0 suppress_bottom = 2 } # fail_reason remote_server_ip = { label = "$lang_stats.field_labels.remote_server_ip" log_field = "remote_server_ip" type = "string" suppress_top = 0 suppress_bottom = 2 } # remote_server_ip remote_server_hostname = { label = "$lang_stats.field_labels.remote_server_hostname" log_field = "remote_server_hostname" type = "string" suppress_top = 0 suppress_bottom = 2 } # remote_server_hostname local_server_hostname = { label = "$lang_stats.field_labels.local_server_hostname" log_field = "local_server_hostname" type = "string" suppress_top = 0 suppress_bottom = 2 } # local_server_hostname } # database.fields ############### # # # # ############### # Log Filters log.filters = { 1 = { label = "1" comment = "" value = "convert_field_map('event_type', 'S->statistics|F->failure|I->information|A->action|P->protocol|Z->parser (all details)')" } # 1 2 = { label = "2" comment = "" value = "(email = 1; 'done';)" } # 2 mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' value = 'email = 1;' } # mark_entry } # log.filters database.numerical_fields = { email = { label = "$lang_stats.field_labels.email" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # email bytes = { label = "$lang_stats.field_labels.bytes" default = false requires_log_field = true log_field = "bytes" type = "float" display_format_type = "bandwidth" } # bytes } # database.numerical_fields create_profile_wizard_options = { date_time_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 service = true sender = true recipient = true forwarded_recipient = true content_scan = true fail_reason = true remote_server_ip = true remote_server_hostname = true local_server_hostname = true } # report_groups } # create_profile_wizard_options not_supported = { sessions = true pageviews = true visitors = true } # not_supported } # gmssmtp