From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,NO_DNS_FOR_FROM, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from [192.168.43.69] (unknown [182.2.69.153]) by gnuweeb.org (Postfix) with ESMTPSA id 2392D7E6B8; Sun, 6 Mar 2022 11:12:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1646565149; bh=Y4QbD4TSswEjnvroiAXbxGwZT7WhMvXzMf7EbyQvBwU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=T06urTLZd8XluD/gDUuCnf+fKrIDpT3Kez/BRbLiifwgFfGwkPugNXcfWvFdST5/B jA5o4XH4WFyqwZLoaT7FQJGdu/3TazxQA/zdvdeeCyBvFMEPFVCUVnn9CJ73Rzd48u revosxrgZO1e7yjNM7irs4EGcC4BNN4V1c4sRzB1v8jPG4uACrUEjyOWe4Djm20EZB qbuh19RXejuFFzKR2ts0/WlLb8ie8oJktqG0vKh2iA4f+iJ3LFbIskBvl7aUG5+s4b dZkF2xb/r1uW0yTVHlIbThPLVgsv7OhM/4Ki6+G6O3fx4gvBZYmsQnVzi75X9FpOiq KXtN4wQsQUX8A== Message-ID: <41f72887-ceae-fcf4-d944-a92fffeb4339@gnuweeb.org> Date: Sun, 6 Mar 2022 18:12:25 +0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: test debug Content-Language: en-US To: Alviro Iskandar Setiawan Cc: GNU/Weeb Mailing List , Alviro Iskandar Setiawan References: <9b92db3f-499a-3bd5-baac-b66495cf44c5@gnuweeb.org> From: Ammar Faizi In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: On 3/6/22 6:08 PM, Alviro Iskandar Setiawan wrote: > On Sun, Mar 6, 2022 at 6:04 PM Ammar Faizi wrote: >> On 3/6/22 6:03 PM, Alviro Iskandar Setiawan wrote: >>> test again >> >> Got your email! >> > > I think this regex is wrong sir, if the message-id is located at the > end of the header, we will not have double LF, because it's already > split by the explode. > > if (!preg_match("/(?:^|\\n)message-id:\s+?(.+?)(?:\\n\S+\:|\\n\\n)/si", > $hdr, $m)) { > $err = "Cannot get the \"message-id\" line"; > goto out; > } Oh right, I forgot that we've already split it before parsing. > maybe we should use this: > > "/(?:^|\\n)message-id:\s+?(.+?)(?:\\n\S+\:|$)/si" That one looks good to me, we should also fix other headers too. -- Ammar Faizi