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 827C969F95 for ; Wed, 24 Mar 2021 11:41:37 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7E52237D0F for ; Wed, 24 Mar 2021 11:41:37 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (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 0DC3637D02 for ; Wed, 24 Mar 2021 11:41:37 +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 CC134463DC for ; Wed, 24 Mar 2021 11:41:36 +0100 (CET) Date: Wed, 24 Mar 2021 11:41:36 +0100 From: Stoiko Ivanov To: Mira Limbeck Cc: pmg-devel@lists.proxmox.com Message-ID: <20210324114136.5d7000ed@rosa.proxmox.com> In-Reply-To: <20210323142823.27616-1-m.limbeck@proxmox.com> References: <20210323142823.27616-1-m.limbeck@proxmox.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; 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.061 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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] applied: [PATCH v2 log-tracker 1/2] after-queue: fix wrong DStatus if relay is 'removed' before 'lmtp' line 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, 24 Mar 2021 10:41:37 -0000 On Tue, 23 Mar 2021 15:28:22 +0100 Mira Limbeck wrote: > We only match a QEntry with the relay Qentry in the after-queue case > when we get to the 'lmtp' line. This is because it contains a reference > from the first QEntry to the filter, and the filter contains a reference > to the relay QEntry. > > If the relay log entries are finished before the 'lmtp' line, there's no > way to match the relay to the first QEntry and we still assume it is > before-queue filtered. > > To fix this we try to match the QEntries via message-id and add weak > references to each other. Then we wait with finalizing either until the > other is also 'removed' (finished). > > The message-id matching might break if the same message-id is used for > different entries, so this is rather a 'hack' than a nice solution, but > there's no other info in the logs we could use to match both QEntries. > > Signed-off-by: Mira Limbeck applied both patches - thanks!