From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:f42::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EHtuFWLsymGsHAAAgWs5BA (envelope-from ) for ; Tue, 28 Dec 2021 11:52:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0JhhEmLsymFY0gAAauVa8A (envelope-from ) for ; Tue, 28 Dec 2021 11:52:18 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E3B063080B for ; Tue, 28 Dec 2021 11:52:17 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D4B4E5F72F; Tue, 28 Dec 2021 10:52:13 +0000 (UTC) X-Greylist: delayed 302 seconds by postgrey-1.36 at yantan; Tue, 28 Dec 2021 10:52:11 UTC Received: from mailout2n.rrzn.uni-hannover.de (mailout2n.rrzn.uni-hannover.de [130.75.2.113]) by mail.notmuchmail.org (Postfix) with ESMTPS id 952C75F5EE for ; Tue, 28 Dec 2021 10:52:11 +0000 (UTC) Received: from localhost (unknown [87.122.247.222]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout2n.rrzn.uni-hannover.de (Postfix) with ESMTPSA id 478991F420 for ; Tue, 28 Dec 2021 11:47:08 +0100 (CET) MIME-Version: 1.0 In-Reply-To: <9fcfcd939fe28bc87fbdb3bb25323fd1@cock.li> References: <9fcfcd939fe28bc87fbdb3bb25323fd1@cock.li> Subject: Re: Statistics about senders with notmuch possible? To: notmuch@notmuchmail.org From: Michael J Gruber Message-ID: <164068842830.6452.17697963800602811854.michaeljgruber+grubix+git@gmail.com> Date: Tue, 28 Dec 2021 11:47:08 +0100 User-Agent: alot/0.10 X-Virus-Scanned: clamav-milter 0.103.3 at mailout2n X-Virus-Status: Clean Message-ID-Hash: C4DLHPGX5VWU3M3R5I3VV2PABTFL7HGK X-Message-ID-Hash: C4DLHPGX5VWU3M3R5I3VV2PABTFL7HGK X-MailFrom: gruber@math.uni-hannover.de X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640688737; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=fnra3sq03yeiEklo5WZcoOMnjlai7u9PM4urk5ZoV2I=; b=Pk37FKIvajwRrUNuRpx8Jedr6zO8d0zRnovHAP7Uyb2FaVhbwHJis4IG7Dl7mfOKBW9XnX zq1UjUoHdFuHQIrfwJfjEtFu2isJ6HiS+I88K/XvhyfmZ2I9pnJlmi9dj0FnBpw2KjAPwn TcegP3KNQQ/ytQGCt4f0UXL4Gk2eNe+FYbSwqfUN0kzwMU1yOjpe5wTQokkHTxZ3FsBJlm g+/BIpKp2Hfat7sgbP5ISwTUfqW+qmrqnApzGMSksNQLSRn/uLPPLjlCacQSFnSrIIKZ+S H/UKCrAb56/Cs5SZE0PfcYZ6bYcwnD+L4e1dVFgFH59JBRJjqLjLw4bQGlKcRw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640688737; a=rsa-sha256; cv=none; b=QqwRGRM6bSuMOdVPETSFdcvecOSFTsGIcSwK6TN2Tr/tGF3jr0B7L218B7CD9hPDYqIPxz jMNfqd95QPW6cxb8uBs/6UaLKxq/s8f/dautxmduBS02/8oGcPiLZLZT7/T4fxjkTJ1L2n nK1KVugGfGNcgaXQaQNClk+8LUFy0E3L0uVG2wups2QOiAoKbJpo/DHkmgLPDC5xudAicR NWh9LBf+MCq2bEfKyHszkAw7T4AkgsNm4IOvFt40QmjyIHtKDLeQcosUFW/NUbyeKAMCK8 e2RA8J5RMA6MOk/JrY57O7jJc2WRKCEta+gbW1eeEaMhRbsOBSZYcemJBTPZTQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.29 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E3B063080B X-Spam-Score: -1.29 X-Migadu-Scanner: scn1.migadu.com X-TUID: KLgQzkCf7BoM signmeup1337@cock.li venit, vidit, dixit 2021-12-27 23:57:18: > I would like to create some kind of statistics to see from which sender > I've got the most emails, having something like a TOP 10 list. > > In the end of every year I delete all my emails, which are not marked as > archive and this year I got over 4.000 and most of them are just > notifications (like ebay, if someone buys something). But I really would > like to figure out where else the most mails are coming from to avoid > them in the next year. > > Is something like this possible with notmuch? `notmuch address` should provide everything you want (bar the sorting): `notmuch address --output=count --deduplicate=address date:2021 | sort -nr | head -n 10` Leave out the dedup option if you want to distinguish senders by the full mailbox address. And, of course, amend the query any way you want. That's the beauty of notmuch's modular approach. Cheers Michael