From 222130f2a188de6940cc34c114905864b44cc74d Mon Sep 17 00:00:00 2001 From: Daniel Schoepe Date: Tue, 21 Jul 2015 20:41:51 +0200 Subject: [PATCH] notmuch-lazysync -- synchronizing tags using dropbox --- 48/1c66f599f16b313ddf2681e1b50dabbe665f98 | 102 ++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 48/1c66f599f16b313ddf2681e1b50dabbe665f98 diff --git a/48/1c66f599f16b313ddf2681e1b50dabbe665f98 b/48/1c66f599f16b313ddf2681e1b50dabbe665f98 new file mode 100644 index 000000000..f61bea1d2 --- /dev/null +++ b/48/1c66f599f16b313ddf2681e1b50dabbe665f98 @@ -0,0 +1,102 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id B6D5E6DE0B27 + for ; Tue, 21 Jul 2015 11:42:02 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.485 +X-Spam-Level: +X-Spam-Status: No, score=-0.485 tagged_above=-999 required=5 tests=[AWL=0.336, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, + 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 bWt03sDXP5eO for ; + Tue, 21 Jul 2015 11:42:00 -0700 (PDT) +Received: from mail-la0-f49.google.com (mail-la0-f49.google.com + [209.85.215.49]) + by arlo.cworth.org (Postfix) with ESMTPS id E36B26DE0A87 + for ; Tue, 21 Jul 2015 11:41:59 -0700 (PDT) +Received: by laem6 with SMTP id m6so123700398lae.0 + for ; Tue, 21 Jul 2015 11:41:55 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=schoepe.org; s=google; + h=from:to:subject:user-agent:date:message-id:mime-version + :content-type:content-transfer-encoding; + bh=d/x9MapIirik+tKeTclvm8rMh1Rxv/T9RglfS5JVbRE=; + b=D6Gyv6Q5vrXrUmx2+3eEMRSa5am+ZsmwY68iDxbyQsjtEWE8JzU+StVkpz9HNzfYPq + 1I9AQfNYKRyNdbdxQysbFDHJ1cXrhKo/JHCHkvMDpcOiWHTjBvYYZBfP5KhOSzb901Bf + HHy5S20g9Or/kNUsL+auvkTmOywdr0gp9RKxU= +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:user-agent:date:message-id + :mime-version:content-type:content-transfer-encoding; + bh=d/x9MapIirik+tKeTclvm8rMh1Rxv/T9RglfS5JVbRE=; + b=OOj7RurkrdJHvrSTra9s5dZSuweNM99RJuHrMlyxP+RQgcKm4mvU+oQsi1IFY8WC8J + 1onUIy6fidNaPYTSb6sqyaxl7Telcbv84tgpiQjVvVpm26kn6fnF74HR8L1MbjES1LUE + Mms/B4a6THSJg4LaM9ioC10a0HHsfP5W5euqMzZ5E0qHfKJ0i80dpIkxhO0V6qaDBjVn + drHQqudeZw3t/rDf/zZ42xTN5D8L/64M9rS1bd39/sidO0sc+GWB2SOr4w1VVnsh4M7U + pOlHreEKYMlT+1xwCcACRQvKe8PBW2pY4qJmpgRrd/AzNZMc27n9Q9aHWgU3mvLdgqcc + S44Q== +X-Gm-Message-State: + ALoCoQnndUatMf0h9f3i3PrqfQZDK8DlwD42IBEHMA+7ZzHwNdihm0IkGYEuRsgMEyMcM4P9HvWY +X-Received: by 10.112.8.108 with SMTP id q12mr10384481lba.113.1437504114546; + Tue, 21 Jul 2015 11:41:54 -0700 (PDT) +Received: from localhost (rd19.odn.sgsnet.se. [46.239.97.207]) + by smtp.gmail.com with ESMTPSA id o5sm6165304lag.9.2015.07.21.11.41.52 + for + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 21 Jul 2015 11:41:52 -0700 (PDT) +From: Daniel Schoepe +To: +Subject: notmuch-lazysync -- synchronizing tags using dropbox +User-Agent: Notmuch/0.20.2 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-unknown-linux-gnu) +Date: Tue, 21 Jul 2015 20:41:51 +0200 +Message-ID: <87a8upjqts.fsf@schoepe.localhost> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +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: Tue, 21 Jul 2015 18:42:02 -0000 + +Hi, + +I needed a way to synchronize notmuch tags between machines without +having to sync all my mail as well (=C3=A0 la muchsync) and without using +Gmail labels for this. As a result, I ended up writing a small tool to +do this by using normal file synchronizers like seafile[1] or dropbox to +do the actual synchronization (since I was too lazy to (re)implement +this). + +Since it's impractical to have the entire notmuch database synchronized +through dropbox, the tool uses a small sqlite database to record tag +commands performed on one machine and replay them on the others. This +works well if mail sorting is done on each machine separately and only +tag modifications performed in the frontend need to be recorded. The way +tag changes are logged is a bit of a hack, but it could be improved in +the future by adding a post-tag hook to notmuch. + +More information can be found on github: + +https://github.com/dschoepe/notmuch-lazysync + +I hope someone else finds this useful as well. + +Best regards, +Daniel + +[1] https://www.seafile.com/en/home/ -- 2.26.2