# Copyright (c) 2010 Flowerfire, Inc. All Rights Reserved. forti_mail = { plugin_version = "1.0.4" info.1.manufacturer = "Fortinet" info.1.device = "FortiMail" info.1.version.1 = "" # 2012-07-03 - 1.0 - MSG - Initial creation. # 2012-07-11 - 1.0.1 - MSG - Changed numerical field name from messages to events # 2012-07-11 - 1.0.2 - MSG - Changed value of mark_events to match numerical field label # 2012-07-27 - 1.0.3 - MSG - Fixed typo in log_data_type # 2013-06-03 - 1.0.4 - MSG - Added support for optional device_id field # The name of the log format log.format.format_label = "FortiMail 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 = "[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][, ].*log_id=[^ ]+[, ]" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Don't try to process this as CSV, even if the file name ends in .csv log.format.ignore_format_lines = "true" # The format of dates and times in this log log.format.date_format = "auto" log.format.time_format = "auto" # Log fields log.fields = { date = "" time = "" device_id = "" log_id = "" type = "" pri = "" session_id = "" client_name = "" dst_ip = "" endpoint = "" from = "" to = "" subject = "" mailer = "" resolved = "" direction = "" virus = "" disposition = "" classifier = "" message_length = "" } # log.fields # Log Parsing Filters log.parsing_filters.parse = ` v.line = current_log_line(); if (matches_regular_expression(v.line, '^([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])([ ,])(.*)')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); v.separator = $3; v.line = $4; collect_listed_fields('', v.line, v.separator, '=', ''); accept_collected_entry('', false); ); ` # Database fields database.fields = { date_time = "" day_of_week = "" hour_of_day = "" log_id = "" device_id = "" type = "" pri = "" session_id = "" client_name = "" dst_ip = "" endpoint = "" from = "" to = "" subject = "" mailer = "" resolved = "" direction = "" virus = "" disposition = "" classifier = "" message_length = "" } # database.fields # Log Filters log.filters = { mark_entry = { label = '$lang_admin.log_filters.mark_entry_label' comment = '$lang_admin.log_filters.mark_entry_comment' entries_field = "true" value = 'events = 1;' } # mark_entry } # Log Filters database.numerical_fields = { events = { label = "$lang_stats.field_labels.events" default = true requires_log_field = false type = "int" display_format_type = "integer" entries_field = true } # events } # database.numerical_fields create_profile_wizard_options = { # How the reports should be grouped in the report menu report_groups = { date_time_group = "" } # report_groups } # create_profile_wizard_options } # forti_mail