From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <s.ivanov@proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by lists.proxmox.com (Postfix) with ESMTPS id 35E27701FE
 for <pmg-devel@lists.proxmox.com>; Fri,  3 Sep 2021 12:55:21 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
 by firstgate.proxmox.com (Proxmox) with ESMTP id 33DC31A58C
 for <pmg-devel@lists.proxmox.com>; Fri,  3 Sep 2021 12:55:21 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
 [94.136.29.106])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits))
 (No client certificate requested)
 by firstgate.proxmox.com (Proxmox) with ESMTPS id 9FEDD1A57E
 for <pmg-devel@lists.proxmox.com>; Fri,  3 Sep 2021 12:55:20 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 755B144548
 for <pmg-devel@lists.proxmox.com>; Fri,  3 Sep 2021 12:55:20 +0200 (CEST)
Date: Fri, 3 Sep 2021 12:55:19 +0200
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: Mira Limbeck <m.limbeck@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Message-ID: <20210903125519.0c2b8de1@rosa.proxmox.com>
In-Reply-To: <20210824093313.955551-2-m.limbeck@proxmox.com>
References: <20210824093313.955551-1-m.limbeck@proxmox.com>
 <20210824093313.955551-2-m.limbeck@proxmox.com>
X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results:  0
 AWL 0.413 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pmg-devel] applied: [PATCH v2 pmg-docs 2/2] add documentation for
 the pmg-log-tracker
X-BeenThere: pmg-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox Mail Gateway development discussion
 <pmg-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pmg-devel/>
List-Post: <mailto:pmg-devel@lists.proxmox.com>
List-Help: <mailto:pmg-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel>, 
 <mailto:pmg-devel-request@lists.proxmox.com?subject=subscribe>
X-List-Received-Date: Fri, 03 Sep 2021 10:55:21 -0000

huge thanks for the work and the review

applied

On Tue, 24 Aug 2021 11:33:13 +0200
Mira Limbeck <m.limbeck@proxmox.com> wrote:

> The Tracking Center makes assumptions which are working fine for most of
> the users, but not for some.
> It might be useful for some users to know that this exists and is the
> backend for the Tracking Center.
> 
> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
> ---
> v2:
>  - reworded based on Dylan's suggestions
>  - removed reference to pmg-log-tracker manpage which doesn't yet exist
> 
>  pmg-admin-guide.adoc |  2 ++
>  pmg-log-tracker.adoc | 36 ++++++++++++++++++++++++++++++++++++
>  2 files changed, 38 insertions(+)
>  create mode 100644 pmg-log-tracker.adoc
> 
> diff --git a/pmg-admin-guide.adoc b/pmg-admin-guide.adoc
> index 043b94a..5ca2b0c 100644
> --- a/pmg-admin-guide.adoc
> +++ b/pmg-admin-guide.adoc
> @@ -79,6 +79,8 @@ include::pmgreport.adoc[]
>  
>  include::pmgupgrade.adoc[]
>  
> +include::pmg-log-tracker.adoc[]
> +
>  :leveloffset: 1
>  
>  include::nmap.adoc[]
> diff --git a/pmg-log-tracker.adoc b/pmg-log-tracker.adoc
> new file mode 100644
> index 0000000..3be58a8
> --- /dev/null
> +++ b/pmg-log-tracker.adoc
> @@ -0,0 +1,36 @@
> +[[chapter_pmg-log-tracker]]
> +ifndef::manvolnum[]
> +pmg-log-tracker - Backend for the Tracking Center
> +=================================================
> +:pmg-toplevel:
> +endif::manvolnum[]
> +
> +`pmg-log-tracker` is the backend for the Tracking Center. It parses the syslog
> +files in `/var/log/` for mail information. You can specify a different file to
> +parse, for example the mail log `/var/log/mail.log`, using the `-i` option.
> +
> +As an example, parsing the mail.log file for everything between the 1st and 15th
> +of July would be possible with the following command:
> +----
> +pmg-log-tracker -i /var/log/mail.log -s "2021-07-01 00:00:00" -e "2021-07-15 23:59:59"
> +----
> +
> +Start time `-s` and end time `-e` are optional. By default the end time will be
> +the current time and the start time will be 0:00 of the current day.
> +
> +With the `--verbose` option, additional info will be printed, such as the
> +complete log for every mail.
> +
> +It is also possible to filter the log entries based on hostname, from address,
> +to address, and other parameters. For a complete overview of all available
> +options, see `pmg-log-tracker --help`.
> +
> +As a side effect of parsing the syslog, which doesn't contain information about
> +the year of the entries, the year passed to the `-s` and `-e` options has to
> +be the current one, rather than the one in which the logs were actually created.
> +
> +
> +ifdef::manvolnum[]
> +include::pmg-copyright.adoc[]
> +endif::manvolnum[]
> +