Re: Bug#755544: notmuch-emacs: doesn't check gpg/pgp signatures by default
On 07/22/2014 12:30 AM, Daniel Kahn Gillmor wrote: > On 07/21/2014 09:03 PM, Jameson Graef Rollins wrote: >> On Mon, Jul 21 2014, David Bremner wrote: >>> notmuch folks: it seems that in vagrant's message, and several others I >>> checked, it notmuch-crypto-process-mime==nil, then no signature button >>> is created at all. >> >> Yes, this is true. The signature button is pretty meaningless if we're >> not processing the signature. >> >> Maybe instead by default we could have a signature button that opens up >> a notmuch-crypto-process-mime customization buffer? > > Or the button could just re-load the current view while processing the > signature, and send "you can customize notmuch-crypt-process-mime to do > this automatically in the future" to *Messages*. Oh, and it seems like in the case where no verification or PGP/MIME procesing was done, we need to make it a *lot* clearer to the user that no signature verification was done. --dkg signature.asc Description: OpenPGP digital signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: Bug#755544: notmuch-emacs: doesn't check gpg/pgp signatures by default
On 07/21/2014 09:03 PM, Jameson Graef Rollins wrote: > On Mon, Jul 21 2014, David Bremner wrote: >> notmuch folks: it seems that in vagrant's message, and several others I >> checked, it notmuch-crypto-process-mime==nil, then no signature button >> is created at all. > > Yes, this is true. The signature button is pretty meaningless if we're > not processing the signature. > > Maybe instead by default we could have a signature button that opens up > a notmuch-crypto-process-mime customization buffer? Or the button could just re-load the current view while processing the signature, and send "you can customize notmuch-crypt-process-mime to do this automatically in the future" to *Messages*. --dkg signature.asc Description: OpenPGP digital signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Bug#755544: notmuch-emacs: doesn't check gpg/pgp signatures by default
Vagrant Cascadian writes: > Package: notmuch-emacs > Version: 0.18.1-1 > Severity: important > > Thanks for notmuch-emacs, it's great! > > I did notice that it doesn't appear to check weather gpg/pgp signatures are > valid by default. > > When I created a signed message to myself, made a copy of it, and then > manually > edited the text within without changing the signature... > > But notmuch-emacs doesn't distinguish between the valid signature : > > Subject: valid gpg sig > To: vagrant at localhost > Date: Mon, 21 Jul 2014 15:03:45 -0700 > > [ multipart/signed ] > [ text/plain ] > this should be a VALID gpg signature. > [ signature.asc: application/pgp-signature ] > > And the edited text, with an invalid signature: > > Subject: invalid gpg sig > To: vagrant at localhost > Date: Mon, 21 Jul 2014 15:03:45 -0700 > > [ multipart/signed ] > [ text/plain ] > this should be an INVALID gpg signature. > [ signature.asc: application/pgp-signature ] Hi Vagrant; Thanks for the bug report. It seems that most of the developers have customized the emacs variable notmuch-crypto-process-mime to t For the moment I suggest that as a workaround, and we'll see about fixing the UI bug upstream. notmuch folks: it seems that in vagrant's message, and several others I checked, it notmuch-crypto-process-mime==nil, then no signature button is created at all.
[PATCH] config: read database.path from $MAILDIR if set
Try to read the config parameter database.path from $MAILDIR before falling back to $HOME/mail --- In the same vein as the $NAME patch, it would also be nice to configure the maildir location for notmuch with one's environment. Just from a brief perusing, I see that $MAILDIR is used at least by Gnus, procmail, GNU mailutils, and mutt. Another thing that might be nice is tilde expantion for database.path, but that's more complicated :) notmuch-config.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index 8f1f48d..88831e2 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -217,7 +217,7 @@ get_username_from_passwd_file (void *ctx) * These default configuration settings are determined as * follows: * - * database_path: $HOME/mail + * database_path: $MAILDIR, otherwise $HOME/mail * * user_name: $NAME variable if set, otherwise * read from /etc/passwd @@ -323,8 +323,10 @@ notmuch_config_open (void *ctx, if (notmuch_config_get_database_path (config) == NULL) { - char *path = talloc_asprintf (config, "%s/mail", - getenv ("HOME")); + char *path = getenv ("MAILDIR"); + if (! path) + path = talloc_asprintf (config, "%s/mail", + getenv ("HOME")); notmuch_config_set_database_path (config, path); talloc_free (path); } -- 2.0.2
Re: Bug#755544: notmuch-emacs: doesn't check gpg/pgp signatures by default
On Mon, Jul 21 2014, David Bremner wrote: > notmuch folks: it seems that in vagrant's message, and several others I > checked, it notmuch-crypto-process-mime==nil, then no signature button > is created at all. Yes, this is true. The signature button is pretty meaningless if we're not processing the signature. Maybe instead by default we could have a signature button that opens up a notmuch-crypto-process-mime customization buffer? jamie. pgpp50bMyggRM.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Bug#755544: notmuch-emacs: doesn't check gpg/pgp signatures by default
On Mon, Jul 21 2014, David Bremner wrote: > notmuch folks: it seems that in vagrant's message, and several others I > checked, it notmuch-crypto-process-mime==nil, then no signature button > is created at all. Yes, this is true. The signature button is pretty meaningless if we're not processing the signature. Maybe instead by default we could have a signature button that opens up a notmuch-crypto-process-mime customization buffer? jamie. -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 818 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140721/ae81d94e/attachment.pgp>
using notmuch programmatically from emacs
On 2014-07-18 21:40, David Bremner writes: > Alan Schmitt writes: > >> Hello, >> >> I sometimes have to find a message knowing only its message id. I know >> how to use a notmuch search in emacs to find the message, then use >> another function to display it in gnus, but I would like to do it >> directly without going through the *notmuch-search* buffer. >> >> Right now I'm doing the following: >> >> #+begin_src emacs-lisp >> (defun as/msgid-to-gnus (msgid) >> "Search for the MSGID using notmuch, then open the message with >> gnus." >> (let ((file (shell-command-to-string (concat "notmuch search >> --output=files 'id:" msgid "'" > > The structured output formats (sexp, json) include file names, so you > should be able to use something like the following > > (defun notmuch-query-get-message-filenames (&rest search-terms) > "Return a list of message-ids of messages that match SEARCH-TERMS" > (notmuch-query-map-threads >(lambda (msg) (plist-get msg :filename)) >(notmuch-query-get-threads search-terms))) > > This is based on the example at the bottom of notmuch-query.el Thanks a lot, this put me on the right track. I had to slightly modify your example as it returns every message in the thread (and not just the matching one). So I first test for id, and the filter the list to return only the matching message. Here is the code I wrote. #+begin_src emacs-lisp (defun notmuch-query-get-message-filenames (msgid) "Return the message filename where the message id matches MSGID and `nil' if no such message is found" (car (remove nil (notmuch-query-map-threads (lambda (msg) (if (equal (plist-get msg :id) msgid) (plist-get msg :filename) nil)) (notmuch-query-get-threads (list (concat "id:" msgid))) #+end_src Thanks again, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 494 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140721/920d527c/attachment.pgp>
Re: Bug#755544: notmuch-emacs: doesn't check gpg/pgp signatures by default
Vagrant Cascadian writes: > Package: notmuch-emacs > Version: 0.18.1-1 > Severity: important > > Thanks for notmuch-emacs, it's great! > > I did notice that it doesn't appear to check weather gpg/pgp signatures are > valid by default. > > When I created a signed message to myself, made a copy of it, and then > manually > edited the text within without changing the signature... > > But notmuch-emacs doesn't distinguish between the valid signature : > > Subject: valid gpg sig > To: vagrant@localhost > Date: Mon, 21 Jul 2014 15:03:45 -0700 > > [ multipart/signed ] > [ text/plain ] > this should be a VALID gpg signature. > [ signature.asc: application/pgp-signature ] > > And the edited text, with an invalid signature: > > Subject: invalid gpg sig > To: vagrant@localhost > Date: Mon, 21 Jul 2014 15:03:45 -0700 > > [ multipart/signed ] > [ text/plain ] > this should be an INVALID gpg signature. > [ signature.asc: application/pgp-signature ] Hi Vagrant; Thanks for the bug report. It seems that most of the developers have customized the emacs variable notmuch-crypto-process-mime to t For the moment I suggest that as a workaround, and we'll see about fixing the UI bug upstream. notmuch folks: it seems that in vagrant's message, and several others I checked, it notmuch-crypto-process-mime==nil, then no signature button is created at all. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] config: read database.path from $MAILDIR if set
Try to read the config parameter database.path from $MAILDIR before falling back to $HOME/mail --- In the same vein as the $NAME patch, it would also be nice to configure the maildir location for notmuch with one's environment. Just from a brief perusing, I see that $MAILDIR is used at least by Gnus, procmail, GNU mailutils, and mutt. Another thing that might be nice is tilde expantion for database.path, but that's more complicated :) notmuch-config.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index 8f1f48d..88831e2 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -217,7 +217,7 @@ get_username_from_passwd_file (void *ctx) * These default configuration settings are determined as * follows: * - * database_path: $HOME/mail + * database_path: $MAILDIR, otherwise $HOME/mail * * user_name: $NAME variable if set, otherwise * read from /etc/passwd @@ -323,8 +323,10 @@ notmuch_config_open (void *ctx, if (notmuch_config_get_database_path (config) == NULL) { - char *path = talloc_asprintf (config, "%s/mail", - getenv ("HOME")); + char *path = getenv ("MAILDIR"); + if (! path) + path = talloc_asprintf (config, "%s/mail", + getenv ("HOME")); notmuch_config_set_database_path (config, path); talloc_free (path); } -- 2.0.2 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
Re: using notmuch programmatically from emacs
On 2014-07-18 21:40, David Bremner writes: > Alan Schmitt writes: > >> Hello, >> >> I sometimes have to find a message knowing only its message id. I know >> how to use a notmuch search in emacs to find the message, then use >> another function to display it in gnus, but I would like to do it >> directly without going through the *notmuch-search* buffer. >> >> Right now I'm doing the following: >> >> #+begin_src emacs-lisp >> (defun as/msgid-to-gnus (msgid) >> "Search for the MSGID using notmuch, then open the message with >> gnus." >> (let ((file (shell-command-to-string (concat "notmuch search >> --output=files 'id:" msgid "'" > > The structured output formats (sexp, json) include file names, so you > should be able to use something like the following > > (defun notmuch-query-get-message-filenames (&rest search-terms) > "Return a list of message-ids of messages that match SEARCH-TERMS" > (notmuch-query-map-threads >(lambda (msg) (plist-get msg :filename)) >(notmuch-query-get-threads search-terms))) > > This is based on the example at the bottom of notmuch-query.el Thanks a lot, this put me on the right track. I had to slightly modify your example as it returns every message in the thread (and not just the matching one). So I first test for id, and the filter the list to return only the matching message. Here is the code I wrote. #+begin_src emacs-lisp (defun notmuch-query-get-message-filenames (msgid) "Return the message filename where the message id matches MSGID and `nil' if no such message is found" (car (remove nil (notmuch-query-map-threads (lambda (msg) (if (equal (plist-get msg :id) msgid) (plist-get msg :filename) nil)) (notmuch-query-get-threads (list (concat "id:" msgid))) #+end_src Thanks again, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 pgp1Rehx6kQ73.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch
[PATCH] config: read user.name from $NAME if set
On Mon, Jul 21 2014, Mark Oteiza wrote: > Try to read the config parameter user.name from $NAME before taking the > user name from /etc/passwd. LGTM. $NAME is used for the same purpose in https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html (and probably in many other places too) Tomi > --- > notmuch-config.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/notmuch-config.c b/notmuch-config.c > index 4886d36..8f1f48d 100644 > --- a/notmuch-config.c > +++ b/notmuch-config.c > @@ -219,7 +219,8 @@ get_username_from_passwd_file (void *ctx) > * > * database_path: $HOME/mail > * > - * user_name: From /etc/passwd > + * user_name: $NAME variable if set, otherwise > + * read from /etc/passwd > * > * user_primary_mail: $EMAIL variable if set, otherwise > * constructed from the username and > @@ -329,7 +330,9 @@ notmuch_config_open (void *ctx, > } > > if (notmuch_config_get_user_name (config) == NULL) { > - char *name = get_name_from_passwd_file (config); > + char *name = getenv ("NAME"); > + if (! name) > + name = get_name_from_passwd_file (config); > notmuch_config_set_user_name (config, name); > talloc_free (name); > } > -- > 2.0.2
[PATCH] nmbug: Translate to Python
On Jul 21, 2014 12:43 AM, "W. Trevor King" wrote: > > devel/nmbug/nmbug | 1450 - > 1 file changed, 755 insertions(+), 695 deletions(-) See git format-patch --break-rewrites option. BR, Jani. -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20140721/0863d802/attachment.html>
Re: [PATCH] config: read user.name from $NAME if set
On Mon, Jul 21 2014, Mark Oteiza wrote: > Try to read the config parameter user.name from $NAME before taking the > user name from /etc/passwd. LGTM. $NAME is used for the same purpose in https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html (and probably in many other places too) Tomi > --- > notmuch-config.c | 7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/notmuch-config.c b/notmuch-config.c > index 4886d36..8f1f48d 100644 > --- a/notmuch-config.c > +++ b/notmuch-config.c > @@ -219,7 +219,8 @@ get_username_from_passwd_file (void *ctx) > * > * database_path: $HOME/mail > * > - * user_name: From /etc/passwd > + * user_name: $NAME variable if set, otherwise > + * read from /etc/passwd > * > * user_primary_mail: $EMAIL variable if set, otherwise > * constructed from the username and > @@ -329,7 +330,9 @@ notmuch_config_open (void *ctx, > } > > if (notmuch_config_get_user_name (config) == NULL) { > - char *name = get_name_from_passwd_file (config); > + char *name = getenv ("NAME"); > + if (! name) > + name = get_name_from_passwd_file (config); > notmuch_config_set_user_name (config, name); > talloc_free (name); > } > -- > 2.0.2 ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch