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 D70B66DE0A7F for ; Thu, 19 Oct 2017 08:10:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.247 X-Spam-Level: X-Spam-Status: No, score=0.247 tagged_above=-999 required=5 tests=[AWL=0.258, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 X_afDWEKBztX for ; Thu, 19 Oct 2017 08:10:07 -0700 (PDT) X-Greylist: delayed 491 seconds by postgrey-1.36 at arlo; Thu, 19 Oct 2017 08:10:07 PDT Received: from istari.evenmere.org (istari.evenmere.org [136.248.125.194]) by arlo.cworth.org (Postfix) with ESMTP id 73F1E6DE0A6C for ; Thu, 19 Oct 2017 08:10:07 -0700 (PDT) Received: by istari.evenmere.org (Postfix, from userid 1000) id 12BFB1E0063; Thu, 19 Oct 2017 11:01:53 -0400 (EDT) From: Brian Sniffen To: Matthew Lear , notmuch@notmuchmail.org Subject: Re: web interface to notmuch In-Reply-To: References: Date: Thu, 19 Oct 2017 11:01:53 -0400 Message-ID: <87tvyvp4f2.fsf@istari.evenmere.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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, 19 Oct 2017 15:10:10 -0000 I put together something like this, visible at https://github.com/briansniffen/notmuch/tree/nmweb/contrib/notmuch-web It's not much of a service. I am pretty sure it is exploitable---that content in text/html parts of messages can do Bad Things to your session. I haven't thought nearly hard enough about how it will deal with multiple users. But it's < 250 lines of Python, so perhaps you can adapt it to what you need. It uses web.py, so you *could* run it standalone, but you'll probably be happier with Apache or nginx or something in front of it, handling TLS termination and that sort of thing. It's only approach to sending mail is generating mailto: links that will open in whatever client the user has configured. -Brian Matthew Lear writes: > Hello all. A little side project at work involves me trying to put together > part of a knowledge share system where users can query and search email > stored and indexed centrally (by offlineimap & notmuch). My intention is to > provide a means to support multiple concurrent read-only accesses to the > notmuch database from users' web browsers so they can query and search mail. > > Consider a few different email addresses being plugged into various > systems, all receiving email on different topics. I'd like to build an > application which presents a web frontend which I can run on the server > which fetches and indexes the mail, and thus present a web interface to > search all mail using notmuch. > > notmuch-web has not seen much development for a few years. > noservice looks pretty nifty but I'm a little unsure of the status and if > it's missing anything fundamental. > > I think my requirements are pretty basic: > > * Read-only access > * Search and display mail only (no sending), including html mails > * Freeform entry of search terms in accordance with notmuch-search-terms(7). > > Would anybody have any ideas about the best way to undertake such a project? > > notmuch-web and noservice definitively look like they could be leveraged, > but I don't know if I'd be better trying to construct something from the > ground up which is better suited / tailored to my requirements (which are > much less than either of the above were intended to fulfil). > > A standalone app would be preferred rather than having to rely on a web > server, although I'm not picky about infrastructure. Web based programming > is not my forte so I'd appreciate any feedback relating also to > implementation, currently available open source web frameworks which could > be used / considered / leveraged, etc. > > Many thanks, > -- Matt > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch