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 CEF2A92445 for ; Wed, 28 Dec 2022 11:17:48 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id A906E23491 for ; Wed, 28 Dec 2022 11:17:18 +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 for ; Wed, 28 Dec 2022 11:17:18 +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 D8C57422B0 for ; Wed, 28 Dec 2022 11:17:17 +0100 (CET) Date: Wed, 28 Dec 2022 11:17:15 +0100 From: Christoph Heiss To: Stoiko Ivanov Cc: pmg-devel@lists.proxmox.com Message-ID: <20221228101715.h4hsz25nyr3k33fl@maui.proxmox.com> References: <20221227122915.218159-1-c.heiss@proxmox.com> <20221227192135.7f7bdf4f@rosa.proxmox.com> <20221228093152.r2f5kbhnutaxrszc@maui.proxmox.com> <20221228105121.7e3ff1f1@rosa.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221228105121.7e3ff1f1@rosa.proxmox.com> X-SPAM-LEVEL: Spam detection results: 0 AWL -0.006 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] [PATCH pmg-api v2] fix #4410: Remove non-null host-bits from CIDR when reading `mynetworks` 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: Wed, 28 Dec 2022 10:17:48 -0000 On Wed, Dec 28, 2022 at 10:51:21AM +0100, Stoiko Ivanov wrote: > [..] > > One option that came to my mind was ... just keeping the API part and the > values in /etc/pmg/mynetworks as they are .. > only normalize the prefixes in get_template_vars for use in the postfix > config > > It has the downside of users getting different values there than they > entered - but I personally never understood why programs forced me to > clear out the host-bits for their use - so I'm not sure if there's any > upside to requiring our users to clear that up? One upside I can think of would be that users cannot _that_ easily typo the prefix, since they need to match up the prefix length to the network address. Then again, we can only do so much if someone puts in wrong values. But otherwise, the above suggestion seems very reasonable to me. I don't think a whole lot of users will read the postfix config directly anyway (why would they?), so IMHO that is a non-issue anyway if the values differ. I'll try it out and send a v3 with the above implemented, maybe it is the better way in the end anyway. > > [..] > > > > Removing it would change the API though - is stability / backwards > > compatibility something we have to be wary of or can I just drop it if > > it's really not used anywhere? > good point! - we do return it from the API - so let's keep it for now > (a 'FIXME: drop network_address and prefix_size with PMG 8.0' comment > might make sense though - then we can clear it up with the next major > release) Ack, I'll just add a comment and leave it as it is for now.