# Copyright (c) 2013 Flowerfire, Inc. All Rights Reserved. mdaemon_routing = { plugin_version = "1.0" info.1.manufacturer = "Alt-N Technologies" info.1.device = "MDaemon Routing" info.1.version.1 = "11" # 2013-04-23 - 1.0 - GMF - Initial version # The name of the log format log.format.format_label = "MDaemon Routing 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 = "^START Event Log / MDaemon.*Routing log information" # All log field parsing will be done using the parsing filters log.format.parse_only_with_filters = "true" # Log fields log.fields = { date = "" time = "" sender = "" recipient = "" inbound_queue_pathname = "" local_queue_pathname = "" message_queue_pathname = "" subject = "" message_id = "" size = "" messages = "" } # log.fields # # Log Parsing Filters log.parsing_filters.parse = ` if (matches_regular_expression(current_log_line(), '^[A-Z][a-z][a-z] ([0-9-]*) ([0-9:]*): (.*)$')) then ( set_collected_field('', 'date', $1); set_collected_field('', 'time', $2); v.remainder = $3; #Sun 2012-01-01 00:00:29: Routing message (local queue): c:\mdaemon\queues\local\pd75000015069.msg if (matches_regular_expression(v.remainder, '^Routing message [(](local queue)]+[)]: (.*)$')) then ( set_collected_field('', 'queue', $1); set_collected_field('', 'local_queue_pathname', $2); ); #Sun 2012-01-01 01:08:07: Routing message (inbound queue): c:\mdaemon\queues\inbound\md50000019305.msg else if (matches_regular_expression(v.remainder, '^Routing message [(](inbound queue)[)]: (.*)$')) then ( set_collected_field('', 'queue', $1); set_collected_field('', 'inbound_queue_pathname', $2); ); #Sun 2012-01-01 01:08:07: * From: yanhg58@yahoo.com; Recipient: aaguilar@eaal.grm.hidro.cu; Size: 1531211; Message: c:\mdaemon\queues\local\md50000015071.msg else if (matches_regular_expression(v.remainder, '^[*] From: ([^;]+); Recipient: ([^;]+); Size: ([0-9]+); Message: (.*)$')) then ( set_collected_field('', 'sender', $1); set_collected_field('', 'recipient', $2); set_collected_field('', 'size', $3); set_collected_field('', 'message_queue_pathname', $4); ); #Sun 2012-01-01 00:00:29: * From: MDaemon@mail.grm.hidro.cu; Recipient: root@grm.hidro.cu else if (matches_regular_expression(v.remainder, '^[*] From: ([^;]+); Recipient: (.*)$')) then ( set_collected_field('', 'sender', $1); set_collected_field('', 'recipient', $2); ); #Sun 2012-01-01 00:00:29: * Subject: Mail Statistics Summary - mail.grm.hidro.cu - Sat, 31 Dec 2011 else if (matches_regular_expression(v.remainder, '^[*] Subject: (.*)$')) then ( set_collected_field('', 'subject', $1); ); #Sun 2012-01-01 00:00:29: * Message-ID: else if (matches_regular_expression(v.remainder, '^[*] Message-ID: (.*)$')) then ( set_collected_field('', 'message_id', $1); accept_collected_entry('', false); ); ); ` # Database fields database.fields = { date_time = "" sender = "" recipient = "" inbound_queue_pathname = "" local_queue_pathname = "" message_queue_pathname = "" subject = "" message_id = "" } # database.fields database.numerical_fields = { messages = { default = true entries_field = true } # messages bytes = { default = true type = "int" integer_bits = 64 display_format_type = "bandwidth" } # bytes } # 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 = { # This shows which numerical fields are related to which non-numerical fields. database_field_associations = { username = { events = true connections = true bytes = true } } # How the reports should be grouped in the report menu report_groups = { date_time_group = "" source_ip = true source_port = true source_hostname = true protocol = true username = true recipient = true sender = true } # report_groups snapons = { # Attach a mail_server_reports snapon mail_server_reports = { snapon = "mail_server_reports" name = "mail_server_reports" label = "$lang_admin.snapons.mail_server_reports.label" parameters = { sender_field.parameter_value = "sender" recipient_field.parameter_value = "recipient" messages_processed_field.parameter_value = "messages" have_messages_delivered_field.parameter_value = false # messages_delivered_field.parameter_value = "messages_delivered" } # parameters } # mail_server_reports # Add the standard reports add_standard_reports = { name = "add_standard_reports" label = "add_standard_reports" snapon = "add_standard_reports" } # add_standard_reports } # snapons } # create_profile_wizard_options } # mdaemon_routing