From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ben Hancock Newsgroups: gmane.emacs.help Subject: Re: Rmail tips Date: Mon, 12 Feb 2024 05:53:38 -0800 Message-ID: <87frxxokkd.fsf@benghancock.com> References: <878r3shgdc.fsf@yandex.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9505"; mail-complaints-to="usenet@ciao.gmane.io" Cc: fernandodemorais.jf@gmail.com, help-gnu-emacs@gnu.org To: m43cap@yandex.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 12 14:54:43 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rZWld-0002E4-M1 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 12 Feb 2024 14:54:43 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZWkl-0005HT-GW; Mon, 12 Feb 2024 08:53:47 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZWkk-0005H6-0V for help-gnu-emacs@gnu.org; Mon, 12 Feb 2024 08:53:46 -0500 Original-Received: from fout5-smtp.messagingengine.com ([103.168.172.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rZWkh-0005sf-D5 for help-gnu-emacs@gnu.org; Mon, 12 Feb 2024 08:53:45 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id 5913813800AC; Mon, 12 Feb 2024 08:53:41 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 12 Feb 2024 08:53:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=benghancock.com; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm2; t=1707746021; x=1707832421; bh=Zi lgNvx5x8cr4Nn0Gkw7oQU9QGqg6FQ5zJNa9wzwErg=; b=QFLpC6VF3T+8Dvyp45 2DZotqhjjGSlJhrwIY5728y/tGP/XmkobifK0kF5M/efnCnYjK/gMW91e+US9fe2 siTeC8BGhFCJwsImYqTzJeIwRnNQ+d9N4tLO8lnEIR+8kHB0RpRDFauVxwB01Fu3 DtMmP0g25Zk8gfpISV9EOauFN+r1E6zoL+tFC3UbWbsenD2a62OKzkWkWyY3HGiz t8w4BQfKrudf7/raT5JXdmXrWutflwiwLathvUw/Lz8w77TG+TND+zNuxNC4Zzf0 Z99W5Ksu7Hnvjz4RjWjgVfuYbAwyk+fMNrIHj1fwYGi8q20onPj9lt1zPcMJid7m k4Vg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1707746021; x=1707832421; bh=ZilgNvx5x8cr4Nn0Gkw7oQU9QGqg 6FQ5zJNa9wzwErg=; b=H6UUsTxDVzSKkW/G8KzFcaEsP725h4SV+RbTelFqIn7x nT27qBOrq6PHoNLA8BWcCYgVYQXKZ6FH1LOuhAXLUGfBjpmDc69ziTVINrRcHcIx Ms/+lHdxc8Kxs2AK62q09Nm/zzxRhLEC5eUmbVxoyQ4ubD5SX34jr4cebMk/0A4k r+VBwHYspu6+qYK7/ghgsn04+mdYWWWUvN+vCOt0Z0hjWLUJEAMRzwlhPhfjye8U ySdlA8iZGjCPjbbov5o3onD1u3zFHp7ZP9jwQlqDeS7ruizLFqyat9OLQuVWx0TI I3fxslUNUoE6ivFIIwRq5pcAUgI93BF6tGJANmGbQg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefgdehhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujgffkfggtgesthdtredttd dttdenucfhrhhomhepuegvnhcujfgrnhgtohgtkhcuoegsvghnsegsvghnghhhrghntgho tghkrdgtohhmqeenucggtffrrghtthgvrhhnpedvkeeuheduudehudevtdehtedvgfffff ehudejleffueettdehteeivdelvdevffenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpegsvghnsegsvghnghhhrghntghotghkrdgtohhm X-ME-Proxy: Feedback-ID: i8a3947c9:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 12 Feb 2024 08:53:40 -0500 (EST) In-Reply-To: <878r3shgdc.fsf@yandex.com> (message from Colin Baxter on Sat, 10 Feb 2024 08:29:19 +0000) Received-SPF: pass client-ip=103.168.172.148; envelope-from=ben@benghancock.com; helo=fout5-smtp.messagingengine.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145919 Archived-At: [Colin wrote:] >>> I filter incoming mail by means of procmail and then read the >>> mailboxes using "rmail-input". This might be too simple for what you >>> want, of course. [Ben replied:] >> This seems like a fine approach and I've tried a similar setup; my >> issue was that new messages in these inboxes weren't treated as >> "unseen" by rmail, so it was hard to distinguish new mail. [Then Colin responded:] > I don't know if it's possible in rmail to "flag" an email as > unread. There is a variable "rmail-unseen-attr-index" with a default > value of 6. Maybe it's possible to use that, but I've never tried. This was a good clue. Rmail recognizes a set of email labels or "attributes" that have special meaning[1], including "unseen" (or unread). After digging into rmail.el and looking at my mail headers more closely, it looks like each message that is read into rmail-file-name via the 'rmail' command is given a special header that looks like this: X-RMAIL-ATTRIBUTES: -------- When a message is "unseen", the dash at position 6 (zero-indexed) gets a special "U" flag, changing the header to this: X--RMAIL-ATTRIBUTES: ------U- Rmail treats these messages differently; it will default to opening the first unseen message when reading a file into rmail, and unseen messages get a different face in the summary buffer so they stand out. I also use fetchmail with maildrop(1) as my mail delivery agent, and it supports adding a custom header to incoming messages (via the '-A' flag); I imagine procmail has a similar option. So it seems feasible to set the set the "unseen" flag on messages that are filtered to different files this way, even without them being read via the 'rmail' command. I may give that a shot. Thanks! - Ben [1] See: info '(emacs) Rmail Attributes'