From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id B24851FF0E4 for ; Tue, 14 Jul 2026 11:30:52 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 09FE521346; Tue, 14 Jul 2026 11:30:51 +0200 (CEST) Message-ID: Date: Tue, 14 Jul 2026 11:30:15 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH pmg-api] d/postinst: do not error out on chown/chmod /var/spool/pmg/ To: Stoiko Ivanov , pmg-devel@lists.proxmox.com References: <20260622082137.2431-1-s.ivanov@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260622082137.2431-1-s.ivanov@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784021398996 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.357 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust 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: VYILOMTLZKZJTS64LHX5ML42GE45VART X-Message-ID-Hash: VYILOMTLZKZJTS64LHX5ML42GE45VART X-MailFrom: d.csapak@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: Looks mostly good for me, the only downside to this i could imagine would be that other failure wouldn't be detected anymore (e.g. wrong permissions, broken storage, etc.) but i guess these will appear with processing mails anyway sooner or later.. from my POV this change should be fine On 6/22/26 10:22 AM, Stoiko Ivanov wrote: > When /var/spool/pmg is a dedicated mountpoint on an unpriviledged > container, its `.lost+found` is not writeable by root inside the > container. > > In this case - it makes sense to not cause postinst to error-out, as > the failing change of mode/ownership is not problematic. > > I don't think that it's a too common setup, but as /var/spool/pmg is > one of the places which does grow with more usage (quarantined files) > having it on a separate mount-point can make sense. > > I considered guarding all the changes of metadata with '|| true', but > as failing to change ownership will result in broken mail-processing > for most of the changes it seems better to fail during apt to have the > user notice the issue as early as possible. > > reported in our community forum: > https://forum.proxmox.com/threads/184240/post-858302 > > Signed-off-by: Stoiko Ivanov > --- > debian/postinst | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/debian/postinst b/debian/postinst > index ee218ab9..ce514ade 100644 > --- a/debian/postinst > +++ b/debian/postinst > @@ -40,8 +40,8 @@ migrate_pmg_smtp_filter() { > > printf "Adjusting group ownership of the mail spool, this might take a while\n" > # no -v: the spool can hold millions of mails > - chgrp -R pmg /var/spool/pmg > - chmod -R g+w /var/spool/pmg > + chgrp -R pmg /var/spool/pmg || true > + chmod -R g+w /var/spool/pmg || true > > chgrp -Rv pmg /etc/pmg/dkim > chmod -Rv g+rX /etc/pmg/dkim