From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6846438166349479936 X-Received: by 2002:adf:db86:: with SMTP id u6mr35339079wri.27.1594412777610; Fri, 10 Jul 2020 13:26:17 -0700 (PDT) X-BeenThere: supmua@googlegroups.com Received: by 2002:adf:b1cf:: with SMTP id r15ls2156760wra.3.gmail; Fri, 10 Jul 2020 13:26:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7TSp8n/QglYBp2ETn6WmuPUMJ3F8wWwJyNBUfHAIZRitvPHSDZWasSt1Bmf0d3z+6rIpQ X-Received: by 2002:adf:9525:: with SMTP id 34mr73435842wrs.313.1594412776909; Fri, 10 Jul 2020 13:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594412776; cv=none; d=google.com; s=arc-20160816; b=o5o6tl0+v7o7LryxxtABwRp6EGArEq2RnLrvkSLXNg6aVFNowEjUORQ/N+AliFKOU8 NOluR9IQGDloqaJqSwUK8H5ENYqKrA3oWe2PKRqACLI5xp3mzlPW7GSdk/UQ5mVYL2eW KvWwkVuCexU/Pamofj1EDP7gplC3UUYjPkbQB4shxpuybKZ0Jes9bVFg2wEdeBfwEyW7 lfIV6dlTqHF/S65PRWW41Tjoc8umUmRX8EcN1c+1DkAplg9OaL7CQy+i48z/dnbLwjNM iDT/GxcS9722N+Tankw8Yg12yrK61mdCjaj0NM5YRltjW45PBFxH6obOxwReWwf7Dx/a EB7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:user-agent:message-id:date:references :in-reply-to:subject:to:from:dkim-signature:dkim-signature; bh=8CEBva4pq/WAFRDTzAcdpnfar40J/beVkR5eesA8Iog=; b=KdkzWCx3+EkHlgVIJeJKueegY8Co0Vmy2pBhbJZJgWk/usdtZlD4zugW0hyRRp6zUK yEWFWUN+ffYG7KGmurGxBg2IT6Ywy9Td4VaRLEJskAj//7FWXCNG/LW5UXv6H4NnQujW jMdndlTfCy1qJOBbfgyCcVD74b9xm+6RBBlhtPdDbDuPMTdkCu24qSG8ZyB43B4UzYDv AtvU40wQqpP95Z2DIg3U/V5f9uCZ76nY33dV8PBbYhEpzn/y10yEOiVnkYAXAWYaAvp7 2BPWLPl9arsi05Er1Hy2bg0PMn+9ElzP4RD3Cz6mmqqNrXp+1lxLpSucE3byEcIDim/h zaUw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@parris.org header.s=fm1 header.b=giOG9nzt; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=VbkbDtLe; spf=pass (google.com: domain of ipv2.lst@parris.org designates 64.147.123.26 as permitted sender) smtp.mailfrom=ipv2.lst@parris.org Return-Path: Received: from wnew1-smtp.messagingengine.com (wnew1-smtp.messagingengine.com. [64.147.123.26]) by gmr-mx.google.com with ESMTPS id g14si740173wmh.3.2020.07.10.13.26.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2020 13:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ipv2.lst@parris.org designates 64.147.123.26 as permitted sender) client-ip=64.147.123.26; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@parris.org header.s=fm1 header.b=giOG9nzt; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=VbkbDtLe; spf=pass (google.com: domain of ipv2.lst@parris.org designates 64.147.123.26 as permitted sender) smtp.mailfrom=ipv2.lst@parris.org Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.west.internal (Postfix) with ESMTP id 46FD5776; Fri, 10 Jul 2020 16:26:14 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 10 Jul 2020 16:26:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=parris.org; h= content-type:from:to:subject:in-reply-to:references:date :message-id:content-transfer-encoding; s=fm1; bh=8CEBva4pq/WAFRD TzAcdpnfar40J/beVkR5eesA8Iog=; b=giOG9nztvZfnYeQDTWNW5Q2ora9ebvY 5Q4FRObY+bW4FdxSe9MFz33GP1Gexr0ochsidSDHjibyGv8B4MqpJmDV8iJJoYIh ioZqASz+jfzeST67wNbDh6yY9V9dhVqaIgZ02wrzpAcEqRGiK4dKuCKSsDpiNolz dNM0CG/1QSXsXNqDS/5UqiQAjNWPFbHn0XFwBf6AAo+G8Yt2e1auilM1NGNxwFa9 xKhYD0HlArh42H7mpz7c/SkD7rEuWktTjte3xQiM5xSd1wgTWUKmLIHkh3xOjP4j UhRHiBLa/gOPQh9wJGxyJqKSK3DHXmj4bqe/4Hll4O+f8ZOnabF9g7w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=8CEBva4pq/WAFRDTzAcdpnfar40J/beVkR5eesA8Iog=; b=VbkbDtLe fwgEqZm2QIfoTPWVHlhJY+uRte6Cuzg39+Hd16/1iSguAeenUqaNWBCJ6yRWAUCh 1FZFeEsetSQxKLe2pC8CQx59F5RVMlDyHMtbFA8blqcsc7xMPPhFwWR9abdNnNs+ CTSq+9Xe6k45auGUDLKOlQTaJvXU+hDYYzGWQafcqk7boTwaQYb9Z+80uuJ+Urf7 7877mVyEz56YGcOzyILz4sh69RwckdfK6UYIpQrYrOfUoKNSQXKUAhS4BAP6qZyO 8/PPom7+RyTODcy+znXXd3en5enMTnWY2MBCVhNrl77EUbnKZaPfR3+t2RTQyeuz UhXKTNhVzo47Yg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrvddugdduheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegthffvufgjfhffkfgfgfesthekre dttderjeenucfhrhhomhepkfgrihhnucfrrghrrhhishcuoehiphhvvddrlhhsthesphgr rhhrihhsrdhorhhgqeenucggtffrrghtthgvrhhnpeejvefhgefgvdetfffgheekgffhgf ehgfevffeuueefgfdtffdvgfffjeevjefgjeenucffohhmrghinheptghonhgtvghpthdr shhuphenucfkphepiedvrdefrdeigedrgedunecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepihhpvhdvrdhlshhtsehprghrrhhishdrohhrgh X-ME-Proxy: Received: from localhost (unknown [62.3.64.41]) by mail.messagingengine.com (Postfix) with ESMTPA id 362F2328005D; Fri, 10 Jul 2020 16:26:13 -0400 (EDT) Content-Type: text/plain; charset=UTF-8 From: Iain Parris To: supmua Subject: Re: [sup] SpamAssassin (Spam/Ham) support for Sup In-reply-to: References: <7c75d917-b99e-4e95-af72-d308acfcb7ado@googlegroups.com> <1594076857-sup-7295@ceres> <5048bacc-c026-45c3-b145-52226916491co@googlegroups.com> <1594233819-sup-5407@ceres> Date: Fri, 10 Jul 2020 21:26:12 +0100 Message-Id: <1594412084-sup-1850@ceres> User-Agent: Sup/0.22.1 Content-Transfer-Encoding: 8bit Hi Robert, Excerpts from Robert Winkler's message of 2020-07-09 15:20:12 -0700: > Yes, this is a good option. I modified my workflow a bit (Spam/Ham are not > watched by Sup anymore. The mails should be copied to the Spam/Ham IMAP > server for learning and are automatically deleted after 5 days). OK, sounds good. > Moving the mail from the | pipe in the thread view with > cat > ~/Maildir/SpamAssassin/Spam/cur/$(cat /proc/sys/kernel/random/uuid) > works; The mail is synced to the IMAP server with OfflineIMAP. However, how > can I pass the mail below the cursor directly to a pipe command? If we're acting on an entire thread, then we can't use pipe_to_process directly. That would only work for an individual message. However, I had a look, and I think I've found a better way to do this. Assuming your source is also another Maildir, then we can find the full path for the original message file. Then we can do a direct file copy of this file into your SpamAssassin Spam Maildir. Here's a demonstration of the concept: === ~/.sup/hooks/keybindings.rb === modes["inbox-mode"].keymap.add :label_spamassassin_spam, "Label as SpamAssassin Spam", 's' === ~/.sup/hooks/startup.rb === class Redwood::InboxMode def label_spamassassin_spam thread = cursor_thread or return spamassassin_maildir_path = "/home/youruser/Maildir/SpamAssassin/Spam/cur/" message_file = File.join( thread.latest_message.source.file_path, thread.latest_message.source_info ) toggle_spam raise "Label 'spam' not set" unless thread.latest_message.labels.include? :spam FileUtils.cp(message_file, spamassassin_maildir_path) BufferManager.flash "Copied to SpamAssassin Spam file: #{File.basename message_file}" end end Kind regards, Iain