From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id C1B2A6DE024F for ; Thu, 20 Feb 2020 04:22:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.067 X-Spam-Level: X-Spam-Status: No, score=-0.067 tagged_above=-999 required=5 tests=[AWL=-0.066, SPF_PASS=-0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pO3fZyjTc9hK for ; Thu, 20 Feb 2020 04:22:48 -0800 (PST) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id C77366DE0207 for ; Thu, 20 Feb 2020 04:22:48 -0800 (PST) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1j4kqq-0004Va-KR; Thu, 20 Feb 2020 07:22:44 -0500 Received: (nullmailer pid 293808 invoked by uid 1000); Thu, 20 Feb 2020 12:22:42 -0000 From: David Bremner To: Sean Whitton , notmuch@notmuchmail.org Subject: Re: Forcing a sync of maildir flags? In-Reply-To: <871rqp97o0.fsf@iris.silentflame.com> References: <871rqp97o0.fsf@iris.silentflame.com> Date: Thu, 20 Feb 2020 08:22:42 -0400 Message-ID: <87r1ypsb1p.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Feb 2020 12:22:49 -0000 Sean Whitton writes: > I have this in my post-new hook: > > notmuch tag -unread -- folder:sent > > The idea is that copies of my sent mail which get returned to me and > stored in my inbox, e.g. by mailing lists, would get maildir Seen tags > added to them. But that does not happen. I guess this is most likely a bug. It would be nice to have a test in T340-maildir-sync.sh that duplicated it. I suspect the problem is related to messages in the new/ subdirectory. Some non-notmuch clients (prominently mutt) interpret being in new/ has having user-visible semantics, so notmuch tries not to move files out of there unnecessarily, On the other hand the maildir spec says that files in new/ cannot have flags, so they cannot have their unread tag removed without moving the file to cur/ > This works: > > notmuch tag +unread -- folder:sent > notmuch tag -unread -- folder:sent > > Is there some more elegant way to force a sync of maildir flags? Am I > the only one that has copies of my own mail in my inbox folder, not > marked as read from the point of view of anything except notmuch? I guess my workflow doesn't expose this problem as I leave many messages unread (relying on the inbox flag). I'm not sure about the locking implications, but having sent messages delivered to cur/ instead of to new/ would probably workaround the problem. d