Search script mail queue in MTA log in perl
I got a script to search for the fate of the letter in the MTA log.
You can download it from the project page .
Wishes, additions, corrections - in GitHub. Short description - under the cut.
SYNOPSIS
This script is designed to search the MTA logs for information about the processing of a letter specified by the MESSAGE-ID | ADDRESS parameters in the START / END time interval (any time or both) by the MTA ID.
Called with arguments - [[START] / [END]] MESSAGE-ID | ADDRESS FILELOG DESCRIPTION The script can track the processing of a specific message inside the MTA by the messages in the log file. The script receives the time interval in which to search for messages, and, either message-id of the message,
either the from or to address of the message. The script should determine the
unique ID of the first message assigned to it by the MTA and display ALL
entries from the log file in the specified time period related to
this ID. In the case when the address from or to the message
is specified , and in the specified period of time there are several messages with the
specified addresses, you need to output entries from the log file, only for the
first message.
The script can be called as:
START and END - this is respectively the start and end time, within
which processing is required. The time is set in ISO
8601 restricted time format (see note 1).
MESSAGE-ID is the message ID.
ADDRESS is a from or to email address
FILE.LOG - the name of the file in which the search is performed.
The sequence of enumeration of the call arguments is any, the time is optional, in this case the search is carried out from the beginning of the log to tomorrow night.
You can download it from the project page .
Wishes, additions, corrections - in GitHub. Short description - under the cut.
SYNOPSIS
This script is designed to search the MTA logs for information about the processing of a letter specified by the MESSAGE-ID | ADDRESS parameters in the START / END time interval (any time or both) by the MTA ID.
Called with arguments - [[START] / [END]] MESSAGE-ID | ADDRESS FILELOG DESCRIPTION The script can track the processing of a specific message inside the MTA by the messages in the log file. The script receives the time interval in which to search for messages, and, either message-id of the message,
./mtalog [START]/[END] MESSAGE-ID|ADDRESS FILELOG
./mtalog 0426T/0427T101231 ya@ya.ru maillog.log
./mtalog /0824T ya@ya.ru maillog.log
./mtalog ya@ya.ru maillog.log
either the from or to address of the message. The script should determine the
unique ID of the first message assigned to it by the MTA and display ALL
entries from the log file in the specified time period related to
this ID. In the case when the address from or to the message
is specified , and in the specified period of time there are several messages with the
specified addresses, you need to output entries from the log file, only for the
first message.
The script can be called as:
mtalog [START]/[END] MESSAGE-ID|ADDRESS FILELOG
START and END - this is respectively the start and end time, within
which processing is required. The time is set in ISO
8601 restricted time format (see note 1).
MESSAGE-ID is the message ID.
ADDRESS is a from or to email address
FILE.LOG - the name of the file in which the search is performed.
The sequence of enumeration of the call arguments is any, the time is optional, in this case the search is carried out from the beginning of the log to tomorrow night.