From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 42B821FF13B for ; Mon, 08 Jun 2026 13:30:40 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5AE591A948; Mon, 8 Jun 2026 13:30:36 +0200 (CEST) From: Stoiko Ivanov To: pmg-devel@lists.proxmox.com Subject: [PATCH pmg-api 2/4] fix #3657: api: tracking center: explicitly set input base from config Date: Mon, 8 Jun 2026 13:29:40 +0200 Message-ID: <20260608112952.679449-3-s.ivanov@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260608112952.679449-1-s.ivanov@proxmox.com> References: <20260608112952.679449-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: 1780918157124 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.086 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 URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [mailtracker.pm] Message-ID-Hash: AYBK6SOQBSLO2JJYUE7NLBBIS5H7FK77 X-Message-ID-Hash: AYBK6SOQBSLO2JJYUE7NLBBIS5H7FK77 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