--- /dev/null
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id C7A10431FBF\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Apr 2013 14:24:40 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id vCzTYHVxf+kc for <notmuch@notmuchmail.org>;\r
+ Sat, 27 Apr 2013 14:24:38 -0700 (PDT)\r
+Received: from mail-la0-f49.google.com (mail-la0-f49.google.com\r
+ [209.85.215.49]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 6BE77431FAE\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Apr 2013 14:24:38 -0700 (PDT)\r
+Received: by mail-la0-f49.google.com with SMTP id fp13so2195942lab.8\r
+ for <notmuch@notmuchmail.org>; Sat, 27 Apr 2013 14:24:36 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=x-received:from:to:subject:in-reply-to:references:user-agent:date\r
+ :message-id:mime-version:content-type:content-transfer-encoding\r
+ :x-gm-message-state;\r
+ bh=I5GpV/6rgqYgKg0jeDb/C/UMiD5W7PYr4wO94Y3Ywz4=;\r
+ b=PfJvWoVOZE7iOcIco3x/sEXK39JPlYK0PQBj5pHiCbvZ364IhrwBmnKL7DVHvw6EcK\r
+ DFZbhmbZNsx9ZmJysicxqPTJykqlJ3fKEj3Zp6Y7+EdryCol13XZ77rqKNGE+LaTzD6y\r
+ 0r/s1iemlrZNc8k/X+eUtIPK9a7h9dF+n5C4BFw93gYbTZtESEQ/CNvldxNw+pD2/moU\r
+ RHm2ZeZBqzQf5YU78mwsZW5mQQ5ijRySwdjZnUnWfugouw1ssVDwu1JdcvmoKTj+mwft\r
+ Kj+J9UZn/7qSDSyhnDu4k6abhggRciQDVAtA1mWvzLGK7cU6Y0jlqvXVpBLEQ4vbllFp\r
+ DZ/g==\r
+X-Received: by 10.112.129.137 with SMTP id nw9mr24536735lbb.56.1367097875460; \r
+ Sat, 27 Apr 2013 14:24:35 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c376-211.dhcp.inet.fi.\r
+ [88.195.118.211])\r
+ by mx.google.com with ESMTPSA id r9sm3509338lbr.3.2013.04.27.14.24.33\r
+ for <multiple recipients>\r
+ (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
+ Sat, 27 Apr 2013 14:24:34 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Peter Wang <novalazy@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v5 03/12] cli: add insert command\r
+In-Reply-To: <1364942517-6982-4-git-send-email-novalazy@gmail.com>\r
+References: <1364942517-6982-1-git-send-email-novalazy@gmail.com>\r
+ <1364942517-6982-4-git-send-email-novalazy@gmail.com>\r
+User-Agent: Notmuch/0.15.2+70~g2eeb96a (http://notmuchmail.org) Emacs/24.2.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Sun, 28 Apr 2013 00:24:28 +0300\r
+Message-ID: <8761z7r7jn.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: quoted-printable\r
+X-Gm-Message-State:\r
+ ALoCoQkTLEevSBETDEHJudgQoaJ4yi3L/7y2+FG6ldcU288Uridvy/LHIzVhrwO02MVgUqJtzZY/\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 27 Apr 2013 21:24:40 -0000\r
+\r
+On Wed, 03 Apr 2013, Peter Wang <novalazy@gmail.com> wrote:\r
+> The notmuch insert command reads a message from standard input,\r
+> writes it to a Maildir folder, and then incorporates the message into\r
+> the notmuch database. Essentially it moves the functionality of\r
+> notmuch-deliver into notmuch.\r
+>\r
+> Though it could be used as an alternative to notmuch new, the reason\r
+> I want this is to allow my notmuch frontend to add postponed or sent\r
+> messages to the mail store and notmuch database, without resorting to\r
+> another tool (e.g. notmuch-deliver) nor directly modifying the maildir.\r
+> ---\r
+> Makefile.local | 1 +\r
+> notmuch-client.h | 3 +\r
+> notmuch-insert.c | 336 +++++++++++++++++++++++++++++++++++++++++++++++++=\r
+++++++\r
+> notmuch.c | 3 +\r
+> 4 files changed, 343 insertions(+)\r
+> create mode 100644 notmuch-insert.c\r
+>\r
+> diff --git a/Makefile.local b/Makefile.local\r
+> index c274f07..bb2381d 100644\r
+> --- a/Makefile.local\r
+> +++ b/Makefile.local\r
+> @@ -261,6 +261,7 @@ notmuch_client_srcs =3D \\r
+> notmuch-config.c \\r
+> notmuch-count.c \\r
+> notmuch-dump.c \\r
+> + notmuch-insert.c \\r
+> notmuch-new.c \\r
+> notmuch-reply.c \\r
+> notmuch-restore.c \\r
+> diff --git a/notmuch-client.h b/notmuch-client.h\r
+> index 45749a6..da332f3 100644\r
+> --- a/notmuch-client.h\r
+> +++ b/notmuch-client.h\r
+> @@ -180,6 +180,9 @@ int\r
+> notmuch_new_command (notmuch_config_t *config, int argc, char *argv[]);\r
+>=20=20\r
+> int\r
+> +notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[]=\r
+);\r
+> +\r
+> +int\r
+> notmuch_reply_command (notmuch_config_t *config, int argc, char *argv[]);\r
+>=20=20\r
+> int\r
+> diff --git a/notmuch-insert.c b/notmuch-insert.c\r
+> new file mode 100644\r
+> index 0000000..19b1cf9\r
+> --- /dev/null\r
+> +++ b/notmuch-insert.c\r
+> @@ -0,0 +1,336 @@\r
+> +/* notmuch - Not much of an email program, (just index and search)\r
+> + *\r
+> + * Copyright =C2=A9 2013 Peter Wang\r
+> + *\r
+> + * Based in part on notmuch-deliver\r
+> + * Copyright =C2=A9 2010 Ali Polatel\r
+> + *\r
+> + * This program is free software: you can redistribute it and/or modify\r
+> + * it under the terms of the GNU General Public License as published by\r
+> + * the Free Software Foundation, either version 3 of the License, or\r
+> + * (at your option) any later version.\r
+> + *\r
+> + * This program is distributed in the hope that it will be useful,\r
+> + * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+> + * GNU General Public License for more details.\r
+> + *\r
+> + * You should have received a copy of the GNU General Public License\r
+> + * along with this program. If not, see http://www.gnu.org/licenses/ .\r
+> + *\r
+> + * Author: Peter Wang <novalazy@gmail.com>\r
+> + */\r
+> +\r
+> +#include "notmuch-client.h"\r
+> +#include "tag-util.h"\r
+> +\r
+> +#include <sys/types.h>\r
+> +#include <sys/stat.h>\r
+> +#include <fcntl.h>\r
+> +\r
+> +static volatile sig_atomic_t interrupted;\r
+> +\r
+> +static void\r
+> +handle_sigint (unused (int sig))\r
+> +{\r
+> + static char msg[] =3D "Stopping... \n";\r
+> +\r
+> + /* This write is "opportunistic", so it's okay to ignore the\r
+> + * result. It is not required for correctness, and if it does\r
+> + * fail or produce a short write, we want to get out of the signal\r
+> + * handler as quickly as possible, not retry it. */\r
+> + IGNORE_RESULT (write (2, msg, sizeof (msg) - 1));\r
+> + interrupted =3D 1;\r
+> +}\r
+> +\r
+> +/* Like gethostname but guarantees that a null-terminated hostname is\r
+> + * returned, even if it has to make one up. Invalid characters are\r
+> + * substituted such that the hostname can be used within a filename.\r
+> + */\r
+> +static void\r
+> +safe_gethostname (char *hostname, size_t len)\r
+> +{\r
+> + char *p;\r
+> +\r
+> + if (gethostname (hostname, len) =3D=3D -1) {\r
+> + strncpy (hostname, "unknown", len);\r
+> + }\r
+> + hostname[len - 1] =3D '\0';\r
+> +\r
+> + for (p =3D hostname; *p !=3D '\0'; p++) {\r
+> + if (*p =3D=3D '/' || *p =3D=3D ':')\r
+> + *p =3D '_';\r
+> + }\r
+> +}\r
+> +\r
+> +/* Call fsync() on a directory path. */\r
+> +static notmuch_bool_t\r
+> +sync_dir (const char *dir)\r
+> +{\r
+> + notmuch_bool_t ret;\r
+> + int fd;\r
+> +\r
+> + fd =3D open (dir, O_RDONLY);\r
+> + if (fd =3D=3D -1) {\r
+> + fprintf (stderr, "Error: open() dir failed: %s\n", strerror (errno));\r
+> + return FALSE;\r
+> + }\r
+> + ret =3D (fsync (fd) =3D=3D 0);\r
+> + if (! ret) {\r
+> + fprintf (stderr, "Error: fsync() dir failed: %s\n", strerror (errno));\r
+> + }\r
+> + close (fd);\r
+> + return ret;\r
+> +}\r
+> +\r
+> +/* Open a unique file in the Maildir 'tmp' directory.\r
+> + * Returns the file descriptor on success, or -1 on failure.\r
+> + * On success, file paths for the message in the 'tmp' and 'new'\r
+> + * directories are returned via tmppath and newpath,\r
+> + * and the path of the 'new' directory itself in newdir. */\r
+> +static int\r
+> +maildir_open_tmp_file (void *ctx, const char *dir,\r
+> + char **tmppath, char **newpath, char **newdir)\r
+> +{\r
+> + pid_t pid;\r
+> + char hostname[256];\r
+> + struct timeval tv;\r
+> + char *filename;\r
+> + int fd =3D -1;\r
+> +\r
+> + /* We follow the Dovecot file name generation algorithm. */\r
+> + pid =3D getpid ();\r
+> + safe_gethostname (hostname, sizeof (hostname));\r
+> + do {\r
+> + gettimeofday (&tv, NULL);\r
+> + filename =3D talloc_asprintf (ctx, "%ld.M%ldP%d.%s",\r
+> + tv.tv_sec, tv.tv_usec, pid, hostname);\r
+> + if (! filename) {\r
+> + fprintf (stderr, "Out of memory\n");\r
+> + return -1;\r
+> + }\r
+> +\r
+> + *tmppath =3D talloc_asprintf (ctx, "%s/tmp/%s", dir, filename);\r
+> + if (! *tmppath) {\r
+> + fprintf (stderr, "Out of memory\n");\r
+> + return -1;\r
+> + }\r
+> +\r
+> + fd =3D open (*tmppath, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0600);\r
+> + } while (fd =3D=3D -1 && errno =3D=3D EEXIST);\r
+> +\r
+> + if (fd =3D=3D -1) {\r
+> + fprintf (stderr, "Error: opening %s: %s\n", *tmppath, strerror (errno));\r
+> + return -1;\r
+> + }\r
+> +\r
+> + *newdir =3D talloc_asprintf (ctx, "%s/new", dir);\r
+> + *newpath =3D talloc_asprintf (ctx, "%s/new/%s", dir, filename);\r
+> + if (! *newdir || ! *newpath) {\r
+> + fprintf (stderr, "Out of memory\n");\r
+> + close (fd);\r
+> + unlink (*tmppath);\r
+> + return -1;\r
+> + }\r
+> +\r
+> + talloc_free (filename);\r
+> +\r
+> + return fd;\r
+> +}\r
+> +\r
+> +/* Copy the contents of standard input (fdin) into fdout. */\r
+> +static notmuch_bool_t\r
+> +copy_stdin (int fdin, int fdout)\r
+> +{\r
+> + char buf[4096];\r
+> + char *p;\r
+> + ssize_t remain;\r
+> + ssize_t written;\r
+> +\r
+> + while (! interrupted) {\r
+> + remain =3D read (fdin, buf, sizeof (buf));\r
+> + if (remain =3D=3D 0)\r
+> + break;\r
+> + if (remain < 0) {\r
+> + if (errno =3D=3D EINTR)\r
+> + continue;\r
+> + fprintf (stderr, "Error: reading from standard input: %s\n",\r
+> + strerror (errno));\r
+> + return FALSE;\r
+> + }\r
+> +\r
+> + p =3D buf;\r
+> + do {\r
+> + written =3D write (fdout, p, remain);\r
+> + if (written < 0 && errno =3D=3D EINTR)\r
+> + continue;\r
+> + if (written <=3D 0) {\r
+> + fprintf (stderr, "Error: writing to temporary file: %s",\r
+> + strerror (errno));\r
+> + return FALSE;\r
+> + }\r
+> + p +=3D written;\r
+> + remain -=3D written;\r
+> + } while (remain > 0);\r
+> + }\r
+> +\r
+> + return ! interrupted;\r
+> +}\r
+> +\r
+> +/* Add the specified message file to the notmuch database, applying tags.\r
+> + * The file is renamed to encode notmuch tags as maildir flags. */\r
+> +static notmuch_bool_t\r
+> +add_file_to_database (notmuch_database_t *notmuch, const char *path,\r
+> + tag_op_list_t *tag_ops)\r
+> +{\r
+> + notmuch_message_t *message;\r
+> + notmuch_status_t status;\r
+> +\r
+> + status =3D notmuch_database_add_message (notmuch, path, &message);\r
+> + switch (status) {\r
+> + case NOTMUCH_STATUS_SUCCESS:\r
+> + case NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID:\r
+> + break;\r
+> + default:\r
+> + case NOTMUCH_STATUS_FILE_NOT_EMAIL:\r
+\r
+If such a message really arrives, the mail system will keep trying if\r
+failure is returned. Maybe deliver the file without indexing, and return\r
+success?\r
+\r
+> + case NOTMUCH_STATUS_READ_ONLY_DATABASE:\r
+> + case NOTMUCH_STATUS_XAPIAN_EXCEPTION:\r
+> + case NOTMUCH_STATUS_OUT_OF_MEMORY:\r
+> + case NOTMUCH_STATUS_FILE_ERROR:\r
+> + case NOTMUCH_STATUS_NULL_POINTER:\r
+> + case NOTMUCH_STATUS_TAG_TOO_LONG:\r
+> + case NOTMUCH_STATUS_UNBALANCED_FREEZE_THAW:\r
+> + case NOTMUCH_STATUS_UNBALANCED_ATOMIC:\r
+> + case NOTMUCH_STATUS_LAST_STATUS:\r
+> + fprintf (stderr, "Error: failed to add `%s' to notmuch database: %s\n",\r
+> + path, notmuch_status_to_string (status));\r
+> + return FALSE;\r
+> + }\r
+> +\r
+> + if (status =3D=3D NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID) {\r
+> + /* Don't change tags of an existing message. */\r
+> + status =3D notmuch_message_tags_to_maildir_flags (message);\r
+> + if (status !=3D NOTMUCH_STATUS_SUCCESS)\r
+> + fprintf (stderr, "Error: failed to sync tags to maildir flags\n");\r
+> + } else {\r
+> + status =3D tag_op_list_apply (message, tag_ops, TAG_FLAG_MAILDIR_SYNC);\r
+\r
+Syncing tags to maildir flags is more interesting here than above. And\r
+it should be done because notmuch insert allows arbitrary tags on the\r
+command line. Having, for example, -unread or +flagged on the command\r
+line makes the flags go out of sync. (notmuch new should do the syncing\r
+too, but it's less important because it only adds new.tags.)\r
+\r
+However, calling notmuch_message_tags_to_maildir_flags() may rename the\r
+file from new to cur, which blows up the directory syncing and file\r
+unlinking on the error path in insert_message() below.\r
+\r
+> + }\r
+> +\r
+> + notmuch_message_destroy (message);\r
+> +\r
+> + return (status =3D=3D NOTMUCH_STATUS_SUCCESS);\r
+> +}\r
+> +\r
+> +static notmuch_bool_t\r
+> +insert_message (void *ctx, notmuch_database_t *notmuch, int fdin,\r
+> + const char *dir, tag_op_list_t *tag_ops)\r
+> +{\r
+> + char *tmppath;\r
+> + char *newpath;\r
+> + char *newdir;\r
+> + int fdout;\r
+> + char *cleanup_path;\r
+> +\r
+> + fdout =3D maildir_open_tmp_file (ctx, dir, &tmppath, &newpath, &newd=\r
+ir);\r
+> + if (fdout < 0)\r
+> + return FALSE;\r
+> +\r
+> + cleanup_path =3D tmppath;\r
+> +\r
+> + if (! copy_stdin (fdin, fdout))\r
+> + goto FAIL;\r
+> +\r
+> + if (fsync (fdout) !=3D 0) {\r
+> + fprintf (stderr, "Error: fsync failed: %s\n", strerror (errno));\r
+> + goto FAIL;\r
+> + }\r
+> +\r
+> + close (fdout);\r
+> + fdout =3D -1;\r
+> +\r
+> + /* Atomically move the new message file from the Maildir 'tmp' direc=\r
+tory\r
+> + * to the 'new' directory. We follow the Dovecot recommendation to\r
+> + * simply use rename() instead of link() and unlink().\r
+> + * See also: http://wiki.dovecot.org/MailboxFormat/Maildir#Mail_deli=\r
+very\r
+> + */\r
+> + if (rename (tmppath, newpath) !=3D 0) {\r
+> + fprintf (stderr, "Error: rename() failed: %s\n", strerror (errno));\r
+> + goto FAIL;\r
+> + }\r
+> +\r
+> + cleanup_path =3D newpath;\r
+> +\r
+> + if (! add_file_to_database (notmuch, newpath, tag_ops)) {\r
+> + /* XXX add an option to keep the file in maildir? */\r
+\r
+Possibly a good idea to let the user decide. This is the part that I\r
+worry most about in the series. It's not unusual to hit xapian\r
+exceptions when the database is already locked, which results\r
+(hopefully!) in another attempt at delivery. If not, mail is lost.\r
+\r
+However, keeping the file in maildir on indexing errors ignores the tags\r
+specified on the notmuch insert command line, and the message will get\r
+just new.tags next time notmuch new is run. This is not nice either.\r
+\r
+BR,\r
+Jani.\r
+\r
+> + goto FAIL;\r
+> + }\r
+> +\r
+> + if (! sync_dir (newdir))\r
+> + goto FAIL;\r
+> +\r
+> + return TRUE;\r
+> +\r
+> + FAIL:\r
+> + if (fdout >=3D 0)\r
+> + close (fdout);\r
+> + unlink (cleanup_path);\r
+> + return FALSE;\r
+> +}\r
+> +\r
+> +int\r
+> +notmuch_insert_command (notmuch_config_t *config, int argc, char *argv[])\r
+> +{\r
+> + notmuch_database_t *notmuch;\r
+> + struct sigaction action;\r
+> + const char *db_path;\r
+> + const char **new_tags;\r
+> + size_t new_tags_length;\r
+> + tag_op_list_t *tag_ops;\r
+> + char *query_string =3D NULL;\r
+> + const char *maildir;\r
+> + int opt_index =3D 1;\r
+> + unsigned int i;\r
+> + notmuch_bool_t ret;\r
+> +\r
+> + db_path =3D notmuch_config_get_database_path (config);\r
+> + new_tags =3D notmuch_config_get_new_tags (config, &new_tags_length);\r
+> +\r
+> + tag_ops =3D tag_op_list_create (config);\r
+> + if (tag_ops =3D=3D NULL) {\r
+> + fprintf (stderr, "Out of memory.\n");\r
+> + return 1;\r
+> + }\r
+> + for (i =3D 0; i < new_tags_length; i++) {\r
+> + if (tag_op_list_append (tag_ops, new_tags[i], FALSE))\r
+> + return 1;\r
+> + }\r
+> +\r
+> + if (parse_tag_command_line (config, argc - opt_index, argv + opt_ind=\r
+ex,\r
+> + &query_string, tag_ops))\r
+> + return 1;\r
+> +\r
+> + if (*query_string !=3D '\0') {\r
+> + fprintf (stderr, "Error: unexpected query string: %s\n", query_string);\r
+> + return 1;\r
+> + }\r
+> +\r
+> + maildir =3D db_path;\r
+> +\r
+> + /* Setup our handler for SIGINT. We do not set SA_RESTART so that co=\r
+pying\r
+> + * from standard input may be interrupted. */\r
+> + memset (&action, 0, sizeof (struct sigaction));\r
+> + action.sa_handler =3D handle_sigint;\r
+> + sigemptyset (&action.sa_mask);\r
+> + action.sa_flags =3D 0;\r
+> + sigaction (SIGINT, &action, NULL);\r
+> +\r
+> + if (notmuch_database_open (notmuch_config_get_database_path (config),\r
+> + NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much))\r
+> + return 1;\r
+> +\r
+> + ret =3D insert_message (config, notmuch, STDIN_FILENO, maildir, tag_=\r
+ops);\r
+> +\r
+> + notmuch_database_destroy (notmuch);\r
+> +\r
+> + return (ret) ? 0 : 1;\r
+> +}\r
+> diff --git a/notmuch.c b/notmuch.c\r
+> index f51a84f..1a44f11 100644\r
+> --- a/notmuch.c\r
+> +++ b/notmuch.c\r
+> @@ -48,6 +48,9 @@ static command_t commands[] =3D {\r
+> { "new", notmuch_new_command, FALSE,\r
+> "[options...]",\r
+> "Find and import new messages to the notmuch database." },\r
+> + { "insert", notmuch_insert_command, FALSE,\r
+> + "[options...] [--] [+<tag>|-<tag> ...] < message",\r
+> + "Add a new message into the maildir and notmuch database." },\r
+> { "search", notmuch_search_command, FALSE,\r
+> "[options...] <search-terms> [...]",\r
+> "Search for messages matching the given search terms." },\r
+> --=20\r
+> 1.7.12.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r