From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id qKNUBXStI2AqVgAA0tVLHw (envelope-from ) for ; Wed, 10 Feb 2021 09:55:00 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id kHwLAXStI2DtQQAAB5/wlQ (envelope-from ) for ; Wed, 10 Feb 2021 09:55:00 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 88B589403E8 for ; Wed, 10 Feb 2021 09:54:58 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 565C91FD68; Wed, 10 Feb 2021 04:54:48 -0500 (EST) Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by mail.notmuchmail.org (Postfix) with ESMTPS id 300D01FAE4 for ; Wed, 10 Feb 2021 04:54:45 -0500 (EST) Received: by mail-wm1-x331.google.com with SMTP id m1so1283199wml.2 for ; Wed, 10 Feb 2021 01:54:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=cupSYQ/6cBx2RU0CNKKlPa1yzdR472HeF3kfW0CNrM4=; b=unsrtY3VpI5e/Pm1hIsCv0R+Yw10Ckml+UCotRhTa0Ed7WSq3+C6Gb+wGErvf+hsYH zrEk5zAmbmY1/R2H9sEbRh+nGlU27qce6P5ks0vgCsDYP90wYJoQlD1C/nswG90qPLLX OyEJ1JVTR8NgKkEqjcje/StTnsjupjrFoFftpc8jpASEBo0Gd212u0b+aCexb5x1Dfq1 8SKl8wnZPysLelgciPfqoq++1Hpt97GGOSlnf9mTtpWaUW2S5KGG9j1+5yWYnCYrQcPZ wbdpkFPrWgFM4ACOovP9LK4RKZRsICO0EIcvL5WS+COleOTgUObX9BG2hDlOgPi6JRJB hOrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=cupSYQ/6cBx2RU0CNKKlPa1yzdR472HeF3kfW0CNrM4=; b=Cu7YxE7XN1j6nTnV/6ZpGqo5qhDJHDO1bDd3Dwr9uDPW4xXhLb41PdaaB4dnt7tAzM 03+ByDDfybAhjuHpxLAsoScCZuPFKTM2gAYpFbP6OiNtbwWrK1xNVuhgs6yreMYiQMkQ Jkad7bMqnyfItWaKuQ/ZOxll2jUUcgQD84xziaHIfCS7fDkE4m8o735mF7OuoLR3kCJN ZwOrVQy9jqi5JovtkVPs2HiQ76pM55W9cw0A/C6pIUHIxwJ0lxpiKuky6EvI3hyt5XNd 0PWJLAlu4pAzq6txdZhVHkP0Bs49IvGBNMdKqDhXUav1jy3IIH9OL7VYgmTSxsiZrq0J lJsQ== X-Gm-Message-State: AOAM533Ga8KPE0aeFUe2VpmPT7XleREZXVBwHPCraxaGw8EDk9umAzTW YcMrPnWso9V8xa7A9/0j4/E3kiW/g+E= X-Google-Smtp-Source: ABdhPJyZ4fyVCSBCT8AmLzxuhAGdJjGudrVQwiCpE3MNFIwrNhk7efRJjtogiGr2lvBNv2btLgRNlA== X-Received: by 2002:a1c:98d4:: with SMTP id a203mr2135865wme.10.1612950878208; Wed, 10 Feb 2021 01:54:38 -0800 (PST) Received: from real.local (102-65-4-69.ftth.web.africa. [102.65.4.69]) by smtp.gmail.com with ESMTPSA id y15sm2199478wrm.93.2021.02.10.01.54.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 01:54:37 -0800 (PST) From: Keegan Carruthers-Smith To: notmuch@notmuchmail.org Subject: notmuch over ssh Date: Wed, 10 Feb 2021 11:52:47 +0200 Message-ID: MIME-Version: 1.0 Message-ID-Hash: 2X2ZBMTCIBR33ZBE4AHRZSSWFZDSRYEU X-Message-ID-Hash: 2X2ZBMTCIBR33ZBE4AHRZSSWFZDSRYEU X-MailFrom: keegan.csmith@gmail.com 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; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Transfer-Encoding: 7bit Content-Type: text/plain; format="flowed"; charset="us-ascii" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.64 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20161025 header.b=unsrtY3V; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 88B589403E8 X-Spam-Score: 0.64 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4NFShxVmx+pO Hello. Thought I'd share a hack I've been using recently. I have my notmuch database on another machine. I wanted to access it via my local emacs session. I didn't want to ssh in to the machine or sync the data to another machine. I realised all communication is done via the notmuch binary, so I wrote a wrapper script which runs notmuch via ssh: #!/usr/bin/env bash args=() for var in "$@" do args+=($(printf '%q' "$var")) done exec ssh real.local -- notmuch "${args[@]}" Note I have hardcoded the remote (real.local). I also needed to escape arguments since the remote shell had a tendancy to interpret them. This escaping isn't fullproof, but has been working so far. I put the above script on my PATH as "notmuch", and emacs magically uses it. Alternatively you could set the notmuch-command to point to the above shell script. Cheers, Keegan