From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 642301FF14C for ; Fri, 12 Jun 2026 19:42:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2A280187C9; Fri, 12 Jun 2026 19:42:30 +0200 (CEST) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Subject: [PATCH pmg-api v3 3/5] fix #3657: api: tracking center: explicitly set input base from config Date: Fri, 12 Jun 2026 19:41:00 +0200 Message-ID: <20260612174145.1190233-4-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260612174145.1190233-1-s.ivanov@proxmox.com> References: <20260612174145.1190233-1-s.ivanov@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781286064920 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.084 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy 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 Message-ID-Hash: 373YNJZWXVSYJVHMEPDR5RAEM4G5UQK6 X-Message-ID-Hash: 373YNJZWXVSYJVHMEPDR5RAEM4G5UQK6 X-MailFrom: s.ivanov@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: makes it possible to override the location of logs which are scanned by pmg-log-tracker. This should enable admins, to either point the log-tracker to another location on disk where e.g. a rsyslog daemon combines the logs of multiple instances, or to only log the mail-facility somewhere and drop /var/log/syslog logging in favor of journalling. pmg-log-tracker still uses syslog-files over the journal, as this was far more performant when we last compared log-file reading to reading from the journal. Signed-off-by: Stoiko Ivanov --- src/PMG/API2/MailTracker.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/PMG/API2/MailTracker.pm b/src/PMG/API2/MailTracker.pm index 1cc93ef2..5c175300 100644 --- a/src/PMG/API2/MailTracker.pm +++ b/src/PMG/API2/MailTracker.pm @@ -41,6 +41,11 @@ my $statmap = { my $run_pmg_log_tracker = sub { my ($args, $includelog) = @_; + my $pmg_cfg = PMG::Config->new(); + my $input_base = $pmg_cfg->get('admin', 'log-tracker-base'); + + push @$args, '--input-base', $input_base; + my $logids = {}; if (defined(my $id = $includelog)) { -- 2.47.3