From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 28CD487A48 for ; Mon, 3 Jan 2022 19:05:52 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1D61A1571B for ; Mon, 3 Jan 2022 19:05:52 +0100 (CET) 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 91FD41570C for ; Mon, 3 Jan 2022 19:05:51 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 544EB45C02 for ; Mon, 3 Jan 2022 19:05:51 +0100 (CET) Date: Mon, 3 Jan 2022 19:05:49 +0100 From: Stoiko Ivanov To: Dietmar Maurer Cc: pmg-devel@lists.proxmox.com Message-ID: <20220103190549.3fc8eae5@rosa.proxmox.com> In-Reply-To: <1130358330.2251.1641231555805@webmail.proxmox.com> References: <1130358330.2251.1641231555805@webmail.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.265 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: Re: [pmg-devel] [RFC pmg-log-tracker] do not assume constant year based on file index X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2022 18:05:52 -0000 On Mon, 3 Jan 2022 18:39:15 +0100 (CET) Dietmar Maurer wrote: > > the old logic is flawed (but that can be said about parsing > > traditional syslog timestamps (w/o year) in general) - it got worse > > with the change in bullseye of rotating syslog weekly by default - > > resulting in users losing one week of logs per day in the new year > > Daily syslog rotation is essential for high volume mail system. Else the log files gets far to big! > > So cant we simply change logfile rotation back to daily? We can consider that - but for most bullseye installations the ship has sailed (assuming that most users do not diff the configs when debian asks them to and simply press 'keep my version') Additionally the one year per log-file really seems brittle to me, or rather the patch should be independent of the logrotation settings. On the other hand - the volume of the logfiles does not bother me too much: * since quite a long while /var/log/mail.log (in debian's standard logrotate config, which we do not touch) was always rotated weekly and contains all relevant logs for PMG (as an additional copy to what's already in /var/log/syslog) - and I think most users did not notice it * users actually running high-volume sites quickly find out that they want/need to adapt their logrotation schedule * Finally I've seen a few posts in our support channels where users actively use weekly rotation and a keep of 32 to get more logs parsed and available in the GUI * comparing the weekly logs of a fairly active site here (50k - 82k mails/month) - we get < 100 MB logs/week My idea for the longer run would be to: * add a dedicated log for pmg, which logs time in ISO8601 (or if this proves too expensive to pase in unix-timestamps) and maybe the hostname * make retention configurable via GUI * either suggest in a wiki-page/the reference documentation or actually by shipping a modified config file - to drop /var/log/mail.log (and in the long run maybe also the mail facility logging from /var/log/syslog)