Introducing mujmap, a notmuch/JMAP bridge

2022-05-09 Thread Eliza Velasquez
Hello notmuch,

I hope this is an appropriate place to announce this! Apologies if not.

I have just released a tool to synchronize notmuch mail with a JMAP
server, i.e. synchronizing tags with keywords and mailboxes. It's very
similar to lieer, which is a tool that does essentially the same but for
GMail.

https://github.com/elizagamedev/mujmap/
https://jmap.io/

I have been using it myself for my own mail with Fastmail, and I am
really enjoying having the richness of notmuch on my desktop and laptop
and still being able to access more or less the same information on my
phone as well.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Help with sending mail from notmuch-emacs

2022-05-09 Thread hgv
Quoting David Bremner  (2022-05-09 18: 13:31)

> What is your setting for the variable
> 
>  notmuch-maildir-use-notmuch-insert
> 
> It should be t (the default) for that style of notmuch-fcc-dirs setting.
>

It is set to the default value (t). AFAIK, everything notmuch in my emacs is 
default except for the values in my config. Doom emacs 
(https://github.com/doomemacs/doomemacs/blob/master/modules/email/notmuch/config.el)
 sets some variables; but I have overwritten the pertinent ones (namely, 
notmuch-fcc-dirs).
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: Help with sending mail from notmuch-emacs

2022-05-09 Thread David Bremner
hgv  writes:


> 1. Mail gets sent but doesn't save in the correct directory via FCC. I
> use msmtpq as my sending program. Upon sending, I receive this
> message: "message-send-mail-with-sendmail: Sending...failed to mail
> for [ -oi -f h...@fastmail.com -t ] : send was successful;" The mail is
> sent but is not saved in the fcc dir nor entered into the notmuch
> database. I have enabled emacs debugger (on entry with different
> functions related to sending) and stepped through the process but
> didn't see any pertinent information in the messages. My fcc line
> reads `(setq notmuch-fcc-dirs "fastmail/Sent +sent +inbox +sent-new")`
> (fuller notmuch-emacs config below). Any guidance on fixing or further
> troubleshooting (what should I look for on debugger) is appreciated.

What is your setting for the variable

 notmuch-maildir-use-notmuch-insert

It should be t (the default) for that style of notmuch-fcc-dirs setting.

___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Help with sending mail from notmuch-emacs

2022-05-09 Thread hgv
Dear Notmuch list,

I have used notmuch (very happily) for a number of years with alot as my 
client. I'm now trying out the emacs client (with doom emacs), which is very 
cool so far. But I am struggling with two particular points around sending 
emails and cannot solve them on my own. I am also new to emacs, so please 
forgive my struggles that stem from being a newbie there.

1. Mail gets sent but doesn't save in the correct directory via FCC. I use 
msmtpq as my sending program. Upon sending, I receive this message: 
"message-send-mail-with-sendmail: Sending...failed to   mail for [ -oi -f 
h...@fastmail.com -t ] : send was successful;" The mail is sent but is not 
saved in the fcc dir nor entered into the notmuch database. I have enabled 
emacs debugger (on entry with different functions related to sending) and 
stepped through the process but didn't see any pertinent information in the 
messages. My fcc line reads `(setq notmuch-fcc-dirs "fastmail/Sent +sent +inbox 
+sent-new")` (fuller notmuch-emacs config below). Any guidance on fixing or 
further troubleshooting (what should I look for on debugger) is appreciated.

2. I have my emacs setup to prefer utf-8 encoding in basically all situations. 
Emails I send with emacs seem to be correctly encoded. But the Content-Type 
header is set only to "text/plain" rather than "text/plain; charset=utf-8" (as 
it is in alot and as it should be). Further, there is no 
Content-Transfer-Encoding header set. Based on my reading of the emacs message 
mode docs, Content-Transfer-Encoding should be set on the fly depending on the 
Content-Type and other factors (to either "quoted-printable" or "base64" for 
"text/plain"). Perhaps I should not worry about these headers; but it seems 
like they affect whether mail gets delivered at certain providers and certainly 
how it displays. Any advice on getting both Content-Type and 
Content-Transfer-Encoding to set correctly? (Without my settings that prefer 
utf-8, my emails are ascii encoded and the Content-Type is set as "text/plain; 
charset=us-ascii" but still no Content-Transfer-Encoding.)

I'm on macos 10.15.7, with notmuch .35 (via homebrew), and GNU emacs 28.1 (from 
https://github.com/d12frosted/homebrew-emacs-plus via homebrew).

Thank you for your help and for the tremendous software!
hgv

```
;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-

---snip---

;; mainly force utf-8
(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(set-file-name-coding-system 'utf-8)
(set-clipboard-coding-system 'utf-8)
(set-buffer-file-coding-system 'utf-8)

---snip---

;; gnus-alias
(autoload 'gnus-alias-determine-identity "gnus-alias" "" t)
(add-hook 'message-setup-hook 'gnus-alias-determine-identity)
(setq gnus-alias-identity-alist
  '(("fastmail"
   ---snip---
   ))
;; Use "fastmail" identity by default
(setq gnus-alias-default-identity "fastmail")
;; Define rules to match work identity
(setq gnus-alias-identity-rules
  ---snip---
  ))
;; sorting out regex and replying
(setq gnus-alias-override-user-mail-address t)
(setq gnus-alias-unknown-identity-rule 'default)

;; auto save
(setq message-auto-save-directory 
"~/.config/emacs/.local/cache/notmuch/unsaved-drafts")
;; supposedly outdated
;; now sourced from language
(setq message-default-charset "utf-8")
(setq mm-coding-system-priorities '(utf-8))

;; notmuch
(after! notmuch
  (setq +notmuch-sync-backend "notmuch new"
+notmuch-delete-tags '("+ztrash")
+notmuch-spam-tags '("+spam")
notmuch-draft-tags '("+draft" "-new")
notmuch-archive-tags '("-inbox" "-unread"))
  (setq notmuch-mua-compose-in 'new-window)
  (setq notmuch-mua-user-agent-function 'notmuch-mua-user-agent-notmuch)
  (setq message-kill-buffer-on-exit t)
  (setq message-send-mail-function 'message-send-mail-with-sendmail)
  (setq sendmail-program "msmtpq"
mail-specify-envelope-from t
message-sendmail-f-is-evil nil
mail-envelope-from 'header
message-sendmail-envelope-from 'header)
  (setq notmuch-address-save-filename 
"~/.config/emacs/.local/notmuch/address-cache")
  (setq notmuch-draft-folder "fastmail/Drafts")
  ;; overwritten from 
~/.config/emacs/.local/straight/repos/notmuch/emacs/notmuch-draft.el
  (defun notmuch-draft--mark-deleted ()
(when notmuch-draft-id
  (notmuch-tag notmuch-draft-id '("+ztrash"
  (setq notmuch-fcc-dirs "fastmail/Sent +sent +inbox +sent-new")
  (setq notmuch-identities
  ---snip---
  (setq notmuch-mua-send-hook '(notmuch-mua-attachment-check))
  (setq notmuch-show-empty-saved-searches nil)
  (setq notmuch-multipart/alternative-discouraged '("text/plain" "text/html"))
  (setq notmuch-saved-searches
 ---snip--- 
  )))
```
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: public-inbox, nmbug or Debbugs and notmuch sync?

2022-05-09 Thread David Bremner
zimoun  writes:

>
> Somehow, I would like to have a bridge: keep Emacs+Notmuch but index
> emails with another format (backend) than maildir as
> public-inbox-v2-format.  It would avoid data duplication and/or
> conversion.
>
> 1: 
>

I talked to the public-inbox author at some point about using notmuch,
but perl bindings were a hard requirement for that. I don't know of and
other interest in perl bindings, and especially no volunteers to
maintain them, so that idea kind of stalled.

>
>>>  3. Debian or GNU use instances of Debbugs.  Tools as ’mailscripts’ [5]
>>>  using ’bts’ CLI [6] are great.  Personally, I prefer the Emacs packages
>>>  ’piem’ [7] and ’debbugs’ [8].  Well, the point is to be able to inject
>>>  the bug report to my local inboxes – for reading offline or for
>>>  tagging.  How could I bridge the Debbugs meta info with a local ’nmbug’?
>>
>> You can use notmuch-slurp-debbug (from mailscripts) to get the mail
>> messages. I haven't thought about synchronizing metadata with
>> debbugs. In principle I guess it should be possible.

> Somehow, if ’nmbug’ would be able to extract the meta info from Debbugs,
> roughly speaking a map between Message-ID and status, and this map would
> be stored as Notmuch tags.  Then, using “notmuch git” would allow an
> easy way for synchronizing my local copy of the bugs mailing lists with
> the current state of Debbugs.  Bah, I do not know. ;-)

At the moment I am focussed on getting notmuch-git to perform a simpler
task well enough to ship as part of notmuch.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: public-inbox, nmbug or Debbugs and notmuch sync?

2022-05-09 Thread zimoun
Hi David,

Thanks for the answer.

On Mon, 09 May 2022 at 12:15, David Bremner  wrote:
> zimoun  writes:

>>  2. Notmuch is strongly linked to the Maildir format as storage but Git
>>  seems an efficient way to exchange and sync across several machines; for
>>  instance using the tool grokmirror [4].  Does it make sense to have
>>  another backend for Notmuch than Maildir?
>
> I don't know grokmirror, it looks like a layer on top of git. You
> can commit maildir to git if you like, notmuch doesn't really care.
> As far as having a backend that is not just mail files on disk, that
> seems unlikely, but I guess you never know.

For instance, I have never been fully satisfied by a tool synchronizing
several large Maildir across machines.  Or a tool for mirroring a public
mailing list.  Unsatisfied because such tool are inefficient or long to
configure; except muchsync which is strongly focused on notmuch.

A tool as public-inbox makes that easy by relying on Git.  Maybe I
misunderstand but from my understanding public-inbox does not track the
files under Maildir as a whole using Git but store [1] the messages in the
Git history, one message per commit.  Somehow, only the last message is
plainly visible and all the others are “hidden” under .git/ as various
Git objects.

Note that in addition, public-inbox can be configured using Xapian.
Well, I am not interested by this part since Notmuch perfectly fits my
needs.

I like an unified interface – I am really happy with Emacs – and the
Emacs fronted for Notmuch.

Somehow, on one hand, I find really handy public-inbox (and other tools
as lei or b4) to follow various public mailing lists.  On the other
hand, I still have (private) email inboxes and I find really handy
Notmuch.  Even, I find really handy Emacs+Notmuch to read and filter all
the messages.

Therefore, I have to convert from public-inbox to maildir and then index
for reading or searching with Emacs+Notmuch.  Otherwise, I would have to
do the opposite and convert my maildirs sync with IMAP to public-inbox
format.

Somehow, I would like to have a bridge: keep Emacs+Notmuch but index
emails with another format (backend) than maildir as
public-inbox-v2-format.  It would avoid data duplication and/or
conversion.

1: 


>>  3. Debian or GNU use instances of Debbugs.  Tools as ’mailscripts’ [5]
>>  using ’bts’ CLI [6] are great.  Personally, I prefer the Emacs packages
>>  ’piem’ [7] and ’debbugs’ [8].  Well, the point is to be able to inject
>>  the bug report to my local inboxes – for reading offline or for
>>  tagging.  How could I bridge the Debbugs meta info with a local ’nmbug’?
>
> You can use notmuch-slurp-debbug (from mailscripts) to get the mail
> messages. I haven't thought about synchronizing metadata with
> debbugs. In principle I guess it should be possible.

About notmuch-slurp-debbug, thanks.  I have tried it, but it uses the
Perl script ’bts’ and it is not packaged for Guix… Aside it would
require some tweaks, if I have checked correctly.

From my point of view, Debbugs is old and many things as interaction is
a poor experience.  The Guix community has a layer named Mumi [2] on the
top of the GNU instance of Debbugs.  You can find an instance here [3].
Well, another story. ;-)

Somehow, if ’nmbug’ would be able to extract the meta info from Debbugs,
roughly speaking a map between Message-ID and status, and this map would
be stored as Notmuch tags.  Then, using “notmuch git” would allow an
easy way for synchronizing my local copy of the bugs mailing lists with
the current state of Debbugs.  Bah, I do not know. ;-)


2: 
3: 


Thanks again for the answer.

Cheers,
simon
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: public-inbox, nmbug or Debbugs and notmuch sync?

2022-05-09 Thread David Bremner
zimoun  writes:

>
> Currently, I synchronize my various Notmuch database using ’muchsync’
> [1] which works well enough for my needs.  Although I am not completely
> satisfied.
>
> Well, I have read this thread, starting at [2]:
>
> WIP: promote nmbug to user sync tool
> id:20220423133848.3852688-1-da...@tethera.net
>
> somehow promoting the subcommand “notmuch git”.
>
>
> All in all, my questions are:
>
>  1. Is it possible to index the Git repo as public-inbox?  From this
>  thread id:608c9185115fd_251d208e0@natae.notmuch [3], I guess no, right?
>
>  Is it planned?  Or any interest?

If I understand your question correctly, the answer is no, and at least
I have no plans for something like that. An nmbug / notmuch-git repo
only contains metadata, not the actual messages. 

>  2. Notmuch is strongly linked to the Maildir format as storage but Git
>  seems an efficient way to exchange and sync across several machines; for
>  instance using the tool grokmirror [4].  Does it make sense to have
>  another backend for Notmuch than Maildir?

I don't know grokmirror, it looks like a layer on top of git. You
can commit maildir to git if you like, notmuch doesn't really care.
As far as having a backend that is not just mail files on disk, that
seems unlikely, but I guess you never know.

>  3. Debian or GNU use instances of Debbugs.  Tools as ’mailscripts’ [5]
>  using ’bts’ CLI [6] are great.  Personally, I prefer the Emacs packages
>  ’piem’ [7] and ’debbugs’ [8].  Well, the point is to be able to inject
>  the bug report to my local inboxes – for reading offline or for
>  tagging.  How could I bridge the Debbugs meta info with a local ’nmbug’?

You can use notmuch-slurp-debbug (from mailscripts) to get the mail
messages. I haven't thought about synchronizing metadata with
debbugs. In principle I guess it should be possible.

d
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


public-inbox, nmbug or Debbugs and notmuch sync?

2022-05-09 Thread zimoun
Hi,

I used Emacs and Notmuch to deal with many public lists.  Thanks!  It
helps a lot.

These days, I am switching from the “subscription“ way to a “fetch” way
via public-inbox thanks to Kyle’s instance  – I
mainly follow Guix.

Currently, I synchronize my various Notmuch database using ’muchsync’
[1] which works well enough for my needs.  Although I am not completely
satisfied.

Well, I have read this thread, starting at [2]:

WIP: promote nmbug to user sync tool
id:20220423133848.3852688-1-da...@tethera.net

somehow promoting the subcommand “notmuch git”.


All in all, my questions are:

 1. Is it possible to index the Git repo as public-inbox?  From this
 thread id:608c9185115fd_251d208e0@natae.notmuch [3], I guess no, right?

 Is it planned?  Or any interest?


 2. Notmuch is strongly linked to the Maildir format as storage but Git
 seems an efficient way to exchange and sync across several machines; for
 instance using the tool grokmirror [4].  Does it make sense to have
 another backend for Notmuch than Maildir?


 3. Debian or GNU use instances of Debbugs.  Tools as ’mailscripts’ [5]
 using ’bts’ CLI [6] are great.  Personally, I prefer the Emacs packages
 ’piem’ [7] and ’debbugs’ [8].  Well, the point is to be able to inject
 the bug report to my local inboxes – for reading offline or for
 tagging.  How could I bridge the Debbugs meta info with a local ’nmbug’?


Thanks in advance for any pointers or comments. :-)


1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 



Cheers,
simon
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org