From: Franz Fellner Date: Sat, 18 Oct 2014 20:27:44 +0000 (+0200) Subject: Re: [PATCH] VIM: Make an option to save sent mail locally X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0d9f3497168b4a6842a6010fd872b9b343cd584a;p=notmuch-archives.git Re: [PATCH] VIM: Make an option to save sent mail locally --- diff --git a/d6/dbf528b422e8fd8f3324300cc8472c2cc26fd9 b/d6/dbf528b422e8fd8f3324300cc8472c2cc26fd9 new file mode 100644 index 000000000..4b944bad5 --- /dev/null +++ b/d6/dbf528b422e8fd8f3324300cc8472c2cc26fd9 @@ -0,0 +1,105 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 2AB9D431FAF + for ; Sat, 18 Oct 2014 13:27:41 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id Lbh-850933oN for ; + Sat, 18 Oct 2014 13:27:35 -0700 (PDT) +Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com + [209.85.212.179]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 71803431FAE + for ; Sat, 18 Oct 2014 13:27:35 -0700 (PDT) +Received: by mail-wi0-f179.google.com with SMTP id d1so3575844wiv.0 + for ; Sat, 18 Oct 2014 13:27:34 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=date:from:to:cc:message-id:in-reply-to:references:subject + :mime-version:content-type:content-transfer-encoding; + bh=bndIK3UWf8IXm/zQL/M18FHUeNHkBTlla6yqEsKbehY=; + b=cwWwdrZ21M8XodDl1PhJRIz2SFy6gF/WBaGJvZD3Ax0E0Gg7UW5yrh7ZBLlYVI/Lwl + XzIh8r3yOv+08vNDJsnWVUpsFUfSbcpFt3KZag/+co0KWn/eONy7dVuTAnCQ8dEJVvoW + +wNlwrYWT6EHrDwI10Kp9zPIbobBx0cCK2whY95/32HLmQNZngfQXGfqadwsJg3QGDgF + Yp0K5TNK8ahJSlCYakadDVHnA4UmcEkXhG5qYO0+OXh6yzbTAYmnI1ZSosKS1Q/INxBL + UJmdU1HJUXewr2K4eVV9M2Ct4mjW1qvZWceuC2CPLlJYrxIPzaMYzx5Uu4+h4UzSqvhi + y05g== +X-Received: by 10.195.13.83 with SMTP id ew19mr20626659wjd.95.1413664053911; + Sat, 18 Oct 2014 13:27:33 -0700 (PDT) +Received: from localhost (p5B00C687.dip0.t-ipconnect.de. [91.0.198.135]) + by mx.google.com with ESMTPSA id xw9sm6153623wjc.24.2014.10.18.13.27.32 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 18 Oct 2014 13:27:33 -0700 (PDT) +Date: Sat, 18 Oct 2014 22:27:44 +0200 +From: Franz Fellner +To: Ian Main , + Ian Main +Message-ID: <5442cd4084ca6_255f136de94d1@TP_L520.notmuch> +In-Reply-To: <543d5e2927b41_5918e8fe90f4@ovo.mains.priv.notmuch> +References: <1412617904-27252-1-git-send-email-imain@stemwinder.org> + <1412619036-29203-1-git-send-email-imain@stemwinder.org> + <20141014154535.GJ23373@TP_L520.localdomain> + <543d5e2927b41_5918e8fe90f4@ovo.mains.priv.notmuch> +Subject: Re: [PATCH] VIM: Make an option to save sent mail locally +Mime-Version: 1.0 +Content-Type: text/plain; + charset=utf-8 +Content-Transfer-Encoding: 7bit +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sat, 18 Oct 2014 20:27:41 -0000 + +Ian Main wrote: +> Franz Fellner wrote: +> > Why not simply use Notmuch::Database.add_message? Would save a +> > system-call. +> > One could easily copy the sent mail into nm_db_path/sent/cur, add it to the db, tag it. +> > Though I don't know enough about maildir handling, but probably rubys +> > Mail module could help here. +> +> So you are saying I'd have to copy the message to the database and then call +> Notmuch::Database.add_message()? If so I think I'd rather stick with the +> system call.. +Yes, that was my intention. I usually prefer using a stable API rather then realying on CLI. +But that's just preference ;) + +All in all it works. So LGTM. + +> +> > Another issue is configuration. Hardcoding "Sent" probably won't fit +> > everyones needs. And (if I understand DOCS correctly) db.add_message +> > doesn't even force you to keep sent mail folder inside db_path; correct +> > me if I'm wrong :) notmuch --insert will put it into folder relative to +> > db_path. +> +> Yeah, I can add it so the folder can be changed. I figured this was just the +> start of things. Really we should be able to fcc it to our upstream provider +> sent mailbox too. +That MIGHT get hard. +All accounts I use store the mails I send to their smtp-server locally, I could sync them again through IMAP. +GMail for example does that. Pushing those mails upstream again is useless. +But there might be setups where it is neccessary to manually store mails inside a sent folder that get's afterwards synced with the IMAP server. + +So if you want that to work in any case we might need to introduce settings for user accounts... + +Franz