From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 11 23:14:51 2016 Received: (at submit) by debbugs.gnu.org; 12 Jul 2016 03:14:51 +0000 Received: from localhost ([127.0.0.1]:47420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMo9q-00018P-54 for submit@debbugs.gnu.org; Mon, 11 Jul 2016 23:14:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:40240) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMmzi-0007kf-T2 for submit@debbugs.gnu.org; Mon, 11 Jul 2016 22:00:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMmzd-0005Ar-2X for submit@debbugs.gnu.org; Mon, 11 Jul 2016 22:00:13 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.6 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_SORBS_WEB autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMmzc-0005Al-Vx for submit@debbugs.gnu.org; Mon, 11 Jul 2016 22:00:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMmza-0000dw-NZ for bug-coreutils@gnu.org; Mon, 11 Jul 2016 22:00:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMmzT-00054g-Ev for bug-coreutils@gnu.org; Mon, 11 Jul 2016 22:00:09 -0400 Received: from n9-38.mail.139.com ([221.176.9.38]:36728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMmzS-00053W-Rj for bug-coreutils@gnu.org; Mon, 11 Jul 2016 22:00:03 -0400 X-RM-SPAM-FLAG: 00000000 Received: from nanospeed@139.com ( [113.108.186.130] ) by ajax-webmail-rmapp-19-11019 (Richmail) with HTTP; Tue, 12 Jul 2016 09:38:44 +0800 (CST) Date: Tue, 12 Jul 2016 09:38:44 +0800 (CST) From: David Pan To: bug-coreutils Message-ID: <2b0b578447706eb-00009.Richmail.00011599210729318851@139.com> Subject: sort -k1.4,1.6n -u HAVE BUGS!!! MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_6105_1297287502.1468287524511" X-Priority: 3 X-RM-TRANSID: 2b0b578447706eb-00009 X-RM-OA-ENC-TYPE: 0 X-CLIENT-INFO: X-TIMING=0&X-MASSSENT=0&X-SENSITIVE=0 X-Mailer: Richmail_Webapp(V1.9.3)A001 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 11 Jul 2016 23:14:49 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) ------=_Part_6105_1297287502.1468287524511 Content-Type: multipart/alternative; boundary="----=_Part_6106_109578123.1468287524511" ------=_Part_6106_109578123.1468287524511 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 7bit Hello Dear: It seems that I find a bug when using the command: sort -k1.4n -u please refer to the attachment for detail . ------=_Part_6106_109578123.1468287524511 Content-Type: text/html;charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hello Dear:

= It seems that I find a bug when using the command:

sort -k1.4n -u

please refer to= the attachment for detail .




------=_Part_6106_109578123.1468287524511-- ------=_Part_6105_1297287502.1468287524511 Content-Type: application/octet-stream; charset=utf-8; name=sort-u.bug Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=sort-u.bug 77u/W25hZ2lvc0BuYWdpb3MgZXRjXSQgY2F0IGFhDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVjbGQu Y29tDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVj bGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM2Ex LmVjbGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM2ExLmVjbGQuY29tDQpjM20xLmVjbGQuY29tDQpj M20xLmVjbGQuY29tDQpjM20xLmVjbGQuY29tDQpjM20xLmVjbGQuY29tDQpjM20xLmVjbGQuY29t DQpjM20xLmVjbGQuY29tDQpjM20xLmVjbGQuY29tDQpjM20xLmVjbGQuY29tDQpjM20yLmVjbGQu Y29tDQpjM20yLmVjbGQuY29tDQpjM20yLmVjbGQuY29tDQpjM20yLmVjbGQuY29tDQpjM20yLmVj bGQuY29tDQpjM20yLmVjbGQuY29tDQpjM20yLmVjbGQuY29tDQpjM20yLmVjbGQuY29tDQpjM3Mx NS5lY2xkLmNvbQ0KYzNzMTUuZWNsZC5jb20NCmMzczE1LmVjbGQuY29tDQpjM3MxNS5lY2xkLmNv bQ0KYzNzMTUuZWNsZC5jb20NCmMzczE1LmVjbGQuY29tDQpjM3MxNS5lY2xkLmNvbQ0KYzNzMTYu ZWNsZC5jb20NCmMzczE2LmVjbGQuY29tDQpjM3MxNi5lY2xkLmNvbQ0KYzNzMTYuZWNsZC5jb20N CmMzczE2LmVjbGQuY29tDQpjM3MxNi5lY2xkLmNvbQ0KYzNzMTYuZWNsZC5jb20NCmMzczE2LmVj bGQuY29tDQpjM3MxNy5lY2xkLmNvbQ0KYzNzMTcuZWNsZC5jb20NCmMzczE3LmVjbGQuY29tDQpj M3MxNy5lY2xkLmNvbQ0KYzNzMTcuZWNsZC5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gKEZpbmFsKQ0KS2VybmVsIFxyIG9uIGFuIFxtDQpbbmFnaW9z QG5hZ2lvcyBldGNdJCBzb3J0IC0tdmVyc2lvbg0Kc29ydCAoR05VIGNvcmV1dGlscykgOC40DQpD b3B5cmlnaHQgKEMpIDIwMTAgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuDQpMaWNlbnNl IEdQTHYzKzogR05VIEdQTCB2ZXJzaW9uIDMgb3IgbGF0ZXIgPGh0dHA6Ly9nbnUub3JnL2xpY2Vu c2VzL2dwbC5odG1sPi4NClRoaXMgaXMgZnJlZSBzb2Z0d2FyZTogeW91IGFyZSBmcmVlIHRvIGNo YW5nZSBhbmQgcmVkaXN0cmlidXRlIGl0Lg0KVGhlcmUgaXMgTk8gV0FSUkFOVFksIHRvIHRoZSBl eHRlbnQgcGVybWl0dGVkIGJ5IGxhdy4NCg0KV3JpdHRlbiBieSBNaWtlIEhhZXJ0ZWwgYW5kIFBh dWwgRWdnZXJ0Lg0KW25hZ2lvc0BuYWdpb3MgZXRjXSQg ------=_Part_6105_1297287502.1468287524511-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 00:27:50 2016 Received: (at 23951) by debbugs.gnu.org; 12 Jul 2016 04:27:50 +0000 Received: from localhost ([127.0.0.1]:47432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMpIT-00034l-VB for submit@debbugs.gnu.org; Tue, 12 Jul 2016 00:27:50 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:35516) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMpIQ-00034V-Hl for 23951@debbugs.gnu.org; Tue, 12 Jul 2016 00:27:48 -0400 Received: by mail-qk0-f180.google.com with SMTP id s63so3856883qkb.2 for <23951@debbugs.gnu.org>; Mon, 11 Jul 2016 21:27:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=eS4Tx0vEhpQjv9SseCqPTHqH/t6tUuabGhpGMkY+g80=; b=UMwDvV0s/+De1da79MrcrXQfh1QcVZMsA7oBOs7htGct6FMtF9sVEnLUiFCMRzOscH jzE/DKTXIFP2Ypm5PqiVqNaBSaAD9l+ao9J7BhFxqadi6IjvO/zikvzF5EYH8ndXfhUB J3w1v8eyV7C+6f76dkVRoebI7c0BCAm9B2YwBZlKZ/DW9wrvG5GlkxqlLKF0sf6Syg/v gMc1CapYnen67+3jKIdzTmkbH6CAt8Qke8xdZ3AS+lFrGBjAZxgewgr4MSX23M3KK9PB U+8Pf5u4NGDYxSxZ+QNqeOX6WwbqLocbBKIjepLj65vxLzwPTl9QWD5VkHdvsQCGeBV8 ngKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=eS4Tx0vEhpQjv9SseCqPTHqH/t6tUuabGhpGMkY+g80=; b=SXSrsLNTwPXLqOwQi+w5dw3BFMIkpOuPIgBJPV47euOMF/yWSZ1Ie5VfT1yIbe8650 p6pj1RFqvbuvghha4NwavbOIEH9R67sEsXdiQOXxkAOh5rRDWNsNAiCjsW76rUIYdRC6 /i1u+DgCAFNOq7h9RtWwRHa37g/xWo8MbvUvK7RP765fTu2UEEVo5SoTUlrW7Da82wdi eNAdKRCZ/3Hagr2jki0I1Ojaj3RQOLDi9Q3vLGw/lSPnsUCkBlxBYxwQXtC9YvjFgfJR i2qdDN2JRlweVTYAUaB7STrL15ct1FcJJqXLN1xho2T53Rc5267NoYSQw9QyknppwzJE WX5g== X-Gm-Message-State: ALyK8tIhvbteUnRaPTf+XjNXDiGtpb/DE/kfbsECk+FrGLQY3Mv69HNH7msE7Yi4LKNEOg== X-Received: by 10.55.201.70 with SMTP id q67mr233800qki.124.1468297661181; Mon, 11 Jul 2016 21:27:41 -0700 (PDT) Received: from ix.home (pool-100-38-105-55.nycmny.fios.verizon.net. [100.38.105.55]) by smtp.gmail.com with ESMTPSA id d38sm2101023qte.17.2016.07.11.21.27.39 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jul 2016 21:27:40 -0700 (PDT) Subject: Re: bug#23951: sort -k1.4,1.6n -u HAVE BUGS!!! Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: text/plain; charset=utf-8 From: Assaf Gordon X-Priority: 3 In-Reply-To: <2b0b578447706eb-00009.Richmail.00011599210729318851@139.com> Date: Tue, 12 Jul 2016 00:27:38 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <29CD7594-DF19-45E3-BE88-F8AA3B1E25F4@gmail.com> References: <2b0b578447706eb-00009.Richmail.00011599210729318851@139.com> To: David Pan X-Mailer: Apple Mail (2.2102) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23951 Cc: 23951@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hello, > On Jul 11, 2016, at 21:38, David Pan wrote: >=20 > It seems that I find a bug when using the command: >=20 > sort -k1.4n -u > please refer to the attachment for detail . You have not indicated exactly what is the suspected incorrect output. May I ask you to detail what is the output you expected vs the output = you got? (i.e. in which command you think the bug is?) Also, in the = subject line you've listed "-k1.4,1.6n", but I do not see such = invocation in the attached file. To help troubleshoot sort-related issues, recent versions of gnu sort = support a new option "--debug" which prints additional information about = the keys being compared. It would be useful to attach the output of such command, for example: =3D=3D=3D=3D=3D=3D $ sort --debug -k1.4n -u aa=20 sort: using =E2=80=98en_US.UTF-8=E2=80=99 sorting rules sort: leading blanks are significant in key 1; consider also specifying = 'b' sort: key 1 is numeric and spans multiple fields c3a1.ecld.com __ c3m2.ecld.com __ c3s15.ecld.com ___ c3s16.ecld.com ___ c3s17.ecld.com ___ c3s18.ecld.com ___ c3s19.ecld.com ___ c3s20.ecld.com ___ c3s21.ecld.com ___ c3s25.ecld.com ___ =3D=3D=3D=3D=3D=3D regards, -assaf P.S. If you do test a newer version of coreutils, please be sure to use = version 8.19 or newer, as it contains a fix for a "sort -u" bug which = was introduced in 8.6 ( = http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=3Deb3f5b3b3de8c6= ca005a701f09bff43d778aece7 ). From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 13 20:39:05 2016 Received: (at 23951) by debbugs.gnu.org; 14 Jul 2016 00:39:05 +0000 Received: from localhost ([127.0.0.1]:50334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNUgD-000665-4s for submit@debbugs.gnu.org; Wed, 13 Jul 2016 20:39:05 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:35317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bNUg7-00065R-Th for 23951@debbugs.gnu.org; Wed, 13 Jul 2016 20:39:03 -0400 Received: by mail-qk0-f181.google.com with SMTP id s63so59941955qkb.2 for <23951@debbugs.gnu.org>; Wed, 13 Jul 2016 17:38:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nzRG1SLxJ1M6r+hRvLiMXCq8PJJdweIDifJHE+/p3c8=; b=OOFA8qYd13hV8n0fRRE7+MBAHMCIOTL2L/WuW6JYtssPXs2P6pJx6/DdF7yIE1eIrT bTbKMJk2YVdq6Fs4BuqGK7TqKSrcnRVbAGGFVZmEarUwsaEdDqActBLFae8f/tYi8jpt IHJYW10D9VTc6UTOPPBaudsFxNujetg2MH3X2l9bSo7yh2/AdF3TJqJuMi5fefCyITOG cnkarEQDlsZEMgoNE1vQqWGCEn8Xe/2JgEfC4tJGrXQ4v81y6bU2HCOQfTecIFQZ55sR ZhAHfUlW+cn7mRPOL/yHiCcDSiC52OAdxH5YYBO7bZ8c6r+rQIt8obOtaOxQJ70gKlT+ pbNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nzRG1SLxJ1M6r+hRvLiMXCq8PJJdweIDifJHE+/p3c8=; b=JvPKtQVZA5xs8gXSfPepCOdLrimE9zijRkVhbDpnB6qhfHFYVUDCXZTwDDKQVGITaP UyNvAOOITHRtEpz9DdkYTLda1egoAeEX8C3iLug+rp4opeTQIL+Ze/fYwCAZQ/Me4cbN ERu0GWxzOvmutbsDBr8JdyjmvrPnvtuMaHzERA54vLsWqgx4UsRSistV0Xxn7hvP4gsL OPjE9B+MvQtRN3r/ehPzyWfRu4qYeZxeYpp8VbCyPbThyqPufwlADHWs1GSB5fyhVXB1 PfQ0N0GDivuKptkWLmFkgthoQcpE2jogLShAgWnTVO125x7Tl+O/C5SuWoa2X1PF2i/n W1bA== X-Gm-Message-State: ALyK8tJFuXdDTxIK61xeiNHIOurKxb4mV+MY0kmmzPD1M3p+J+1QHEeVo1qCX4PhMCooFw== X-Received: by 10.233.222.4 with SMTP id s4mr13476082qkf.74.1468456734480; Wed, 13 Jul 2016 17:38:54 -0700 (PDT) Received: from ix.home (pool-100-38-105-55.nycmny.fios.verizon.net. [100.38.105.55]) by smtp.gmail.com with ESMTPSA id f135sm476052qke.37.2016.07.13.17.38.53 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jul 2016 17:38:53 -0700 (PDT) Subject: Re: bug#23951: sort -k1.4,1.6n -u HAVE BUGS!!! Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2102\)) Content-Type: text/plain; charset=utf-8 From: Assaf Gordon X-Priority: 3 In-Reply-To: <2b0b578447706eb-00009.Richmail.00011599210729318851@139.com> Date: Wed, 13 Jul 2016 20:38:52 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <451367AE-5C9B-442D-AC46-117D92CB87EC@gmail.com> References: <2b0b578447706eb-00009.Richmail.00011599210729318851@139.com> To: David Pan X-Mailer: Apple Mail (2.2102) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 23951 Cc: 23951@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tag 23951 notabug close 23951 stop Hello, quoting an off-list email from David: > When I use "sort -k1.4n -u", system output miss [c3m1.ecld.com]. > then "sort -k1.4n aa |sort -u" the [c3m1.ecld.com] appear again. This is not a bug but correct behavior. The parameter "-k1.4n" means that the compared keys start at the digit = (e.g. "1", "2") - thus the compared key of both "c3a1" and "c3m1" is "1", and "-u" outputs = only one of them. using "sort -u" separately treats the entire line as the key, thus = "c3a1" and "c3m1" are different. The following will demonstrate: $ printf "aaa1\nbbb2\nccc1\n" | sort -k1.4n aaa1 ccc1 bbb2 $ printf "aaa1\nbbb2\nccc1\n" | sort -k1.4n -u aaa1 bbb2 $ printf "aaa1\nbbb2\nccc1\n" | sort -k1.4n | sort -u aaa1 bbb2 ccc1 In the first two examples, the letters do not matter at all. Because the = key is "-k1.4", the first three characters are ignored, and the compared values are the = digits 1,2,1. In the second example, asking for unique values refer to unique keys, = meaning lines with key "1" will be printed once (aaa1). In the third example, the additional 'sort' negates the first 'sort', = because it first sorts all lines alphabetically, then prints unique = lines, while using the entire line as a key. Recent versions of 'sort' support the '--debug' option, which helps = troubleshooting such cases: =3D=3D=3D $ printf "aaa1\nbbb2\nccc1\n" | sort --debug -k1.4n=20 sort: using =E2=80=98en_US.UTF-8=E2=80=99 sorting rules sort: leading blanks are significant in key 1; consider also specifying = 'b' sort: key 1 is numeric and spans multiple fields aaa1 _ ____ ccc1 _ ____ bbb2 _ ____ =3D=3D=3D As such, I'm closing this bug, but discussion can continue by replying = to this thread. regards, - assaf From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 24 18:11:30 2018 Received: (at control) by debbugs.gnu.org; 24 Oct 2018 22:11:30 +0000 Received: from localhost ([127.0.0.1]:40944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFRNB-0005jv-Sv for submit@debbugs.gnu.org; Wed, 24 Oct 2018 18:11:30 -0400 Received: from mail-pg1-f176.google.com ([209.85.215.176]:38229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gFRN9-0005jj-PM for control@debbugs.gnu.org; Wed, 24 Oct 2018 18:11:28 -0400 Received: by mail-pg1-f176.google.com with SMTP id f8-v6so2990534pgq.5 for ; Wed, 24 Oct 2018 15:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=JbPbzjf6hMRHfXEZbl2owF/wdGiirPi3x2slPs+bBqg=; b=lav1vEW9WXbTCdcmMIiLyd9MI02bZuYXGtCaQMgZr01z1ymVh/adZdnJ/qq8ITn6Zg TUnhA5lOeuspiY3RtaY1rEejbEIvh5SfnkCvbT+hJY4bc876UOrL8FstqfS0GNqINcxq uiicy6IDqwFRCm0h9eTQhjSGYHgHzNlbWOeYwXCZWa0fjxeDD+OKqGck7MdWBl51euVB ezT3ebR/GpTRZrTUircwNlyzzWffRJVhBN7XY1zkTxc4dxWnAVfIFvgarVicKfgjmmx0 1hACWqCM7DRFo0wrpdBaRd25nspqquZVd5h860cVTgMuF3HNrQ+aQz0F+6oivC6Q06O4 BbbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=JbPbzjf6hMRHfXEZbl2owF/wdGiirPi3x2slPs+bBqg=; b=LbwaAza8QLbtYiDvSo/vinemRz1c+NkESUq14PBOQ62NCp+v0s05zPYuX/lmlw/Xr5 0XSRzTaQObeC+ZO9X1VUJ5KiPJjK+eWTwWY3wQhCc97ZIOYUN2Gi9iftPaV5LYgsNIuv G7QG/RUqZnJiCY838Qk9u/x74K2fu2dIFX7Fo/C7tlrSsIyjLjePdQzoePXRkyP9/wEV Ao6e48FKauCBzK7bBn20w4GfgBFgG+cDIQQBIRkAORbuS+bvGz9Ao1EM7jAeneoeJGl3 CiJGMd2oWyC3a+CMWKi2WI6j78FsGW8y5rnpU8F4tMVcv4oI11H23N0sPxGPW6WH8/PE nWMg== X-Gm-Message-State: AGRZ1gI6Qqfqw244HneH+Cun/P4Bv4fK/+2S3IhUZoKsr3VbCyfPtQnB oExr5GxeKq1A14tyHaPchlFwhrCr+R4= X-Google-Smtp-Source: AJdET5fdY19rZYbECCeYyn6E+0AOwgUekZSxDuNUF1V4kPyrQkNSZeFKQp174kiu8u9S4czzTcaFrA== X-Received: by 2002:aa7:8305:: with SMTP id t5-v6mr4245986pfm.81.1540419081327; Wed, 24 Oct 2018 15:11:21 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id 72-v6sm7729335pfl.126.2018.10.24.15.11.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Oct 2018 15:11:20 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: Date: Wed, 24 Oct 2018 16:11:18 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 23951 notabug close 23951 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.215.176 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.215.176 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 23951 notabug close 23951 From unknown Tue Jun 17 01:43:38 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 22 Nov 2018 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator