~abcdw/rde-discuss

18 2

Adding new mail account (other than gmail)

Demis Balbach <db@minikn.xyz>
Details
Message ID
<87tug831ch.fsf@minikn.xyz>
DKIM signature
pass
Download raw message

Hello,

I've been trying to add a new mail account with my mail service provider
of choice (www.mailbox.org). I'd like to use isync/mbsync for syncing
because I've used it in the past.

After looking at the code a bit, I think what I need to do in order to
make this work is to create new mail-settings for mailbox using
`generate-isync-serializer'. I tried doing this:

---
(define mailbox-folder-mapping
  '(("inbox"   . "INBOX")
    ("sent"    . "Sent")
    ("drafts"  . "Drafts")
    ("trash"   . "Trash")
    ("junk"    . "Junk")
    ("archive" . "Archiv")))


(define mailbox-isync-settings
  ((@@ (rde features mail) generate-isync-serializer)
                             "imap.mailbox.org" mailbox-folder-mapping))

(define %db-features
  ;;; ...
    (feature-mail-settings #:mailing-lists
                          (list (mail-lst 'guix-devel "~abcdw/rde-discuss@lists.sr.ht"
                                          '("https://lists.sr.ht/~abcdw/rde-discuss")))
                          #:mail-accounts
                          (list (mail-account
                                 (id 'private)
                                 (fqda "db@minikn.xyz")
                                 (pass-cmd "pass show Mail/Mailbox"))))
    (feature-isync #:isync-verbose #t
                  #:isync-serializers
                  `((mailbox . ,mailbox-isync-settings))))
---

Unfortunately, this resulted in

---
guix home: error: failed to load './config.scm':
srfi/srfi-1.scm:586:17: In procedure map1:
Wrong type to apply: #f
make: *** [Makefile:5: geekcave-home-build] Error 1
---

Again, my guille isn't good enough to debug this further :)

Another problem I encountered is with `feature-mail-settings'.
If I add my mail account but do NOT add a mailing list, like this:

---
 (feature-mail-settings #:mail-accounts
                          (list (mail-account
                                 (id 'private)
                                 (fqda "db@minikn.xyz")
                                 (pass-cmd "pass show Mail/Mailbox"))))
---

I get this error

---
guix home: error: failed to load './config.scm':
rde/features/mail.scm:105:2: In procedure feature-mail-settings:
Wrong type (expecting exact integer): #<&message message: "mailing-lists: The predicate 'list-of-mailing-lists?' is not satisfied with value '()'.">
make: *** [Makefile:5: geekcave-home-build] Error 1
---

Thank you in advance,

---
Best regards,

Demis Balbach
Details
Message ID
<87ilwopb07.fsf@trop.in>
In-Reply-To
<87tug831ch.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-11-19 11:07, Demis Balbach wrote:

> Hello,
>
> I've been trying to add a new mail account with my mail service provider
> of choice (www.mailbox.org). I'd like to use isync/mbsync for syncing
> because I've used it in the past.
>
> After looking at the code a bit, I think what I need to do in order to
> make this work is to create new mail-settings for mailbox using
> `generate-isync-serializer'. I tried doing this:
>
> ---
> (define mailbox-folder-mapping
>   '(("inbox"   . "INBOX")
>     ("sent"    . "Sent")
>     ("drafts"  . "Drafts")
>     ("trash"   . "Trash")
>     ("junk"    . "Junk")
>     ("archive" . "Archiv")))
>
>
> (define mailbox-isync-settings
>   ((@@ (rde features mail) generate-isync-serializer)
>                              "imap.mailbox.org" mailbox-folder-mapping))

I exported generate-isync-serializer, so you can use it without @@.
Probably, when you get your setup up and running I can add mailbox
account type to rde's mail.scm.

>
> (define %db-features
>   ;;; ...
>     (feature-mail-settings #:mailing-lists
>                           (list (mail-lst 'guix-devel "~abcdw/rde-discuss@lists.sr.ht"
>                                           '("https://lists.sr.ht/~abcdw/rde-discuss")))
>                           #:mail-accounts
>                           (list (mail-account
It was very close, but you forgot to set the type of the account.
>                                  (id 'private)
>                                  (fqda "db@minikn.xyz")
>                                  (pass-cmd "pass show Mail/Mailbox"))))
>     (feature-isync #:isync-verbose #t
>                   #:isync-serializers
>                   `((mailbox . ,mailbox-isync-settings))))
> ---
>
> Unfortunately, this resulted in
>
> ---
> guix home: error: failed to load './config.scm':
> srfi/srfi-1.scm:586:17: In procedure map1:
> Wrong type to apply: #f
> make: *** [Makefile:5: geekcave-home-build] Error 1
> ---
>
> Again, my guille isn't good enough to debug this further :)
>
> Another problem I encountered is with `feature-mail-settings'.
> If I add my mail account but do NOT add a mailing list, like this:
>
> ---
>  (feature-mail-settings #:mail-accounts
>                           (list (mail-account
>                                  (id 'private)
>                                  (fqda "db@minikn.xyz")
>                                  (pass-cmd "pass show Mail/Mailbox"))))
> ---
>
> I get this error
>
> ---
> guix home: error: failed to load './config.scm':
> rde/features/mail.scm:105:2: In procedure feature-mail-settings:
> Wrong type (expecting exact integer): #<&message message: "mailing-lists: The predicate 'list-of-mailing-lists?' is not satisfied with value '()'.">
> make: *** [Makefile:5: geekcave-home-build] Error 1
> ---

Fix is on the way.

>
> Thank you in advance,
>
> ---
> Best regards,
>
> Demis Balbach

BTW, in case you didn't see it yet, I have a stream about my mail setup
in Emacs: https://youtu.be/3xWEnAVl1Tw

-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<87lf1fkam8.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
Hello Andrew,

> Probably, when you get your setup up and running I can add mailbox
> account type to rde's mail.scm.

Thank you. I applied your suggestions and was able to get isync to work
with these settings:


(define mailbox-folder-mapping
 '(("inbox"   . "INBOX")
 ("sent"    . "Sent")
 ("drafts"  . "Drafts")
 ("trash"   . "Trash")
 ("junk"    . "Junk")
 ("archive" . "Archiv")))

(define mailbox-isync-settings
 (generate-isync-serializer "imap.mailbox.org" mailbox-folder-mapping))

(feature-mail-settings #:mail-accounts
 (list (mail-account
  (id 'personal)
  (fqda "db@minikn.xyz")
  (type 'mailbox)
  (pass-cmd "pass show Mail/Mailbox"))))

(feature-isync #:isync-verbose #t
 #:isync-serializers
 `((mailbox . ,mailbox-isync-settings)))

The one thing that kept it from working straight away was that I had to
manually create `~/mail/accounts/db@minikn.xyz' otherwise mbsync would
throw an error. Watching the output running `guix home reconfigure' I
can see that it should automatically create all the necessary folders,
don't know why it didn't in this case.

After that I enabled `feature-notmuch'. At first it wouldn't work. Sorry
I don't have the original error message at hand, but the *Messages*
buffer would say something like

> notmuch returned with error code 1

when trying to run `M-x notmuch'. It turns out I first need to manually
run `notmuch new', after that it worked!

However, I'm still having problems with sending mail. I enabled
`feature-emacs-message' for that. The first thing I don't understand is
why you use `msmtp' instead of the builtin smtp client in emacs?
Regardless, I also enable `feature-msmtp' for that matter, but when
trying to send an email via `M-x compose-mail', I get

> msmtp: account default not found: no configuration file available

And this is where I'm stuck now.

> Fix is on the way.

Thank you very much.

> BTW, in case you didn't see it yet, I have a stream about my mail setup
> in Emacs: https://youtu.be/3xWEnAVl1Tw

Thanks! I watched it and it helped me in understanding very much!

This is totally unrelated, but something that took me a while to figure
out is whenever I enable a feature that sets env vars, or uses
`home-environment-variables-service-type' to be more precise I need to
relog into sway. Given the documentation for the service

> If you include such service to you home environment definition,
> it will add the following content to the setup-environment script
> (which is expected to be sourced by the login shell)

This makes total sense. However, when running `guix home reconfigure'
it's not apparent to me if I need to relog or not. It would be nice to
have a help message or anything like that.

Best regards,

Demis Balbach.
Details
Message ID
<8735nkj2w4.fsf@trop.in>
In-Reply-To
<87lf1fkam8.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-11-23 00:56, Demis Balbach wrote:

> Hello Andrew,
>
>> Probably, when you get your setup up and running I can add mailbox
>> account type to rde's mail.scm.
>
> Thank you. I applied your suggestions and was able to get isync to work
> with these settings:
>
>
> (define mailbox-folder-mapping
>  '(("inbox"   . "INBOX")
>  ("sent"    . "Sent")
>  ("drafts"  . "Drafts")
>  ("trash"   . "Trash")
>  ("junk"    . "Junk")
>  ("archive" . "Archiv")))
>
> (define mailbox-isync-settings
>  (generate-isync-serializer "imap.mailbox.org" mailbox-folder-mapping))
>
> (feature-mail-settings #:mail-accounts
>  (list (mail-account
>   (id 'personal)
>   (fqda "db@minikn.xyz")
>   (type 'mailbox)
>   (pass-cmd "pass show Mail/Mailbox"))))
>
> (feature-isync #:isync-verbose #t
>  #:isync-serializers
>  `((mailbox . ,mailbox-isync-settings)))
>
> The one thing that kept it from working straight away was that I had to
> manually create `~/mail/accounts/db@minikn.xyz' otherwise mbsync would
> throw an error. Watching the output running `guix home reconfigure' I
> can see that it should automatically create all the necessary folders,
> don't know why it didn't in this case.

By default it creates only folders for configurations, but those are
storing the state and it's a little trickier, but I wrote a TODO entry
for that, probably will just run mkdir-p for mail dirs on activation.

Thank you for catching it, it's very valuable.

>
> After that I enabled `feature-notmuch'. At first it wouldn't work. Sorry
> I don't have the original error message at hand, but the *Messages*
> buffer would say something like
>
>> notmuch returned with error code 1
>
> when trying to run `M-x notmuch'. It turns out I first need to manually
> run `notmuch new', after that it worked!

Similiar thing here, I'll think what I can do about it.

>
> However, I'm still having problems with sending mail. I enabled
> `feature-emacs-message' for that. The first thing I don't understand is
> why you use `msmtp' instead of the builtin smtp client in emacs?

It's flexible, fast and allows to determine sender based on From header,
which is quite handy, when you use a few different accounts.

> Regardless, I also enable `feature-msmtp' for that matter, but when
> trying to send an email via `M-x compose-mail', I get
>
>> msmtp: account default not found: no configuration file available

Oops!  I forgot to implement serialization code for it!)  I tested
handcrafted configuration, was satisfied with the result and finished my
work on feature-msmtp (:

Will add it soon.

>
> And this is where I'm stuck now.
>
>> Fix is on the way.
>
> Thank you very much.
>
>> BTW, in case you didn't see it yet, I have a stream about my mail setup
>> in Emacs: https://youtu.be/3xWEnAVl1Tw
>
> Thanks! I watched it and it helped me in understanding very much!
>
> This is totally unrelated, but something that took me a while to figure
> out is whenever I enable a feature that sets env vars, or uses
> `home-environment-variables-service-type' to be more precise I need to
> relog into sway. Given the documentation for the service

AFAIK, there is no good, reliable way to updated environment variables
of a running process and be sure it uses a new value internally, so it
kinda expected, but I'll keep in mind that you faced this thing and
probably will describe in documentation.

>
>> If you include such service to you home environment definition,
>> it will add the following content to the setup-environment script
>> (which is expected to be sourced by the login shell)
>
> This makes total sense. However, when running `guix home reconfigure'
> it's not apparent to me if I need to relog or not. It would be nice to
> have a help message or anything like that.

Maybe we can implement an extension for on-change service, which checks
if setup-environment script was changed and informs user about it and
the possible necessity to relogin.

BTW, I use tmux and it spawns a login shell, so I can easily get a fresh
environment without relogin.

Thank you for testing it out and finding all this issues, it's very
helpful!

>
> Best regards,
>
> Demis Balbach.

-- 
Best regards,
Andrew Tropin
Details
Message ID
<87zgpsho3i.fsf@trop.in>
In-Reply-To
<87lf1fkam8.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-11-23 00:56, Demis Balbach wrote:

> Hello Andrew,
>
>> Probably, when you get your setup up and running I can add mailbox
>> account type to rde's mail.scm.
>
> Thank you. I applied your suggestions and was able to get isync to work
> with these settings:
>
>
> (define mailbox-folder-mapping
>  '(("inbox"   . "INBOX")
>  ("sent"    . "Sent")
>  ("drafts"  . "Drafts")
>  ("trash"   . "Trash")
>  ("junk"    . "Junk")
>  ("archive" . "Archiv")))

Are you shure that it is "Archiv", not "Archive"?
Junk is an equivalent for Spam folder?

>
> (define mailbox-isync-settings
>  (generate-isync-serializer "imap.mailbox.org" mailbox-folder-mapping))
>
> (feature-mail-settings #:mail-accounts
>  (list (mail-account
>   (id 'personal)
>   (fqda "db@minikn.xyz")
>   (type 'mailbox)
>   (pass-cmd "pass show Mail/Mailbox"))))
>
> (feature-isync #:isync-verbose #t
>  #:isync-serializers
>  `((mailbox . ,mailbox-isync-settings)))
>

-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<877dcwlf7o.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
> Thank you for catching it, it's very valuable.

Glad that I can be of help.

> Will add it soon.

I figured that. I understood that there simply was no code to generate
the config file. I spend some hours yesterday trying to implement a
feature that configures the builtin `smtpmail' on my own, but
unfortunately I'm not experienced enough yet with Guile.

I got to a point where I it would accept a mail account id and fetch the
corresponding account from the config, the next step would be to parse
its values responsible for sending email like smtp server, user, etc
(after first adding them to mail-account I suppose) and then write them
using `elisp-configuration service'.

However, now that you said you'll be working on msmtp feature I don't
know if I should continue or not. It could give more options to users I
guess.

> Maybe we can implement an extension for on-change service, which checks
> if setup-environment script was changed and informs user about it and
> the possible necessity to relogin.

That would be awesome!

> BTW, I use tmux and it spawns a login shell, so I can easily get a fresh
> environment without relogin.

But the problems remains the same (I guess): You know when you need a
new login shell. I don't have a problem with relogging either, totally
fine, the problem I had that I didn't know I had to relog.

> Thank you for testing it out and finding all this issues, it's very
> helpful!

I'm super thankful for Guix home and rde. Much much appreciated. RDE is
the setup I've always wanted without knowing it :). Especially at the
moment is feels odd, because I went 5 steps back. Because of my limited
Guile knowledge I'm not able to do simply things (like configure
smtpmail / msmtp) ... at least not in a "guixy" way. But at the same
time I clearly see what guix home with rde is capable of so I love
digging in!

> Are you shure that it is "Archiv", not "Archive"?

You were right, it's `Archive', I must have changed it along the way for
some reason (`Archiv' is German for `Archive').
 
> Junk is an equivalent for Spam folder?

Junk is meant to be a recycle bin and spam is your typical spam folder.

I just created a fresh account to see what folders are set up ootb:

- INBOX
- Drafts
- Sent
- Junk
- Trash
- Archive

--
Best regards,

Demis Balbach
Details
Message ID
<87zgprceqa.fsf@trop.in>
In-Reply-To
<877dcwlf7o.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-11-25 11:08, Demis Balbach wrote:

>> Thank you for catching it, it's very valuable.
>
> Glad that I can be of help.
>
>> Will add it soon.
>
> I figured that. I understood that there simply was no code to generate
> the config file. I spend some hours yesterday trying to implement a
> feature that configures the builtin `smtpmail' on my own, but
> unfortunately I'm not experienced enough yet with Guile.
>
> I got to a point where I it would accept a mail account id and fetch the
> corresponding account from the config, the next step would be to parse
> its values responsible for sending email like smtp server, user, etc
> (after first adding them to mail-account I suppose) and then write them
> using `elisp-configuration service'.
>
> However, now that you said you'll be working on msmtp feature I don't
> know if I should continue or not. It could give more options to users I
> guess.
>

Added a relatively flexible serialization to feature-msmtp.

Added a creation of mail folders for mail accounts.  The solution is not
ideal, but will prevent isync from throwing an error about non-existing
folder.

> After that I enabled `feature-notmuch'. At first it wouldn't work. Sorry
> I don't have the original error message at hand, but the *Messages*
> buffer would say something like

> > notmuch returned with error code 1

> when trying to run `M-x notmuch'. It turns out I first need to
> manually run `notmuch new', after that it worked!

I cosider it as notmuch.el interface issue, please report it to notmuch
mailing list (you can CC me).  CLI explicitly states that you need to
run notmuch new, when the database is not initialized, but notmuch.el
doesn't for some reason.

>> Maybe we can implement an extension for on-change service, which checks
>> if setup-environment script was changed and informs user about it and
>> the possible necessity to relogin.
>
> That would be awesome!
>

Did it.  Now it should notify, when setup-environment or on-first-login
scripts get updated.

>> BTW, I use tmux and it spawns a login shell, so I can easily get a fresh
>> environment without relogin.
>
> But the problems remains the same (I guess): You know when you need a
> new login shell. I don't have a problem with relogging either, totally
> fine, the problem I had that I didn't know I had to relog.
>
>> Thank you for testing it out and finding all this issues, it's very
>> helpful!
>
> I'm super thankful for Guix home and rde. Much much appreciated. RDE is
> the setup I've always wanted without knowing it :). Especially at the
> moment is feels odd, because I went 5 steps back. Because of my limited
> Guile knowledge I'm not able to do simply things (like configure
> smtpmail / msmtp) ... at least not in a "guixy" way. But at the same
> time I clearly see what guix home with rde is capable of so I love
> digging in!

Really glad to hear that, thank you for kind words :)

>> Are you shure that it is "Archiv", not "Archive"?
>
> You were right, it's `Archive', I must have changed it along the way for
> some reason (`Archiv' is German for `Archive').
>  
>> Junk is an equivalent for Spam folder?
>
> Junk is meant to be a recycle bin and spam is your typical spam folder.
>
> I just created a fresh account to see what folders are set up ootb:
>
> - INBOX
> - Drafts
> - Sent
> - Junk
> - Trash
> - Archive
>

It's a little bit trickier about mailbox-folder-mapping, because there
are some tag related logic in pre and post hooks for notmuch, which
expects a specific directory structure and not customizable yet.  I'll
adjust the implementation later, when will have a little bit more time,
desire and a fresh mind for that.  Report your experience, please, it
can make me prioritize this task higher.

-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<87tufy51i3.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
Working like a charm now (This mail is proof :))

One change I'd suggest is to not set hardcode `msmtp' in
`feature-message', but rather set it if `feature-msmtp' is enabled?

Because if one wants to use `feature-message' but not `msmtp' I guess
that's a problem.

Thanks for adding the serialization!

--
Best regards,

Demis.
Details
Message ID
<87r1azfosb.fsf@trop.in>
In-Reply-To
<87tufy51i3.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-11-26 17:24, Demis Balbach wrote:

> Working like a charm now (This mail is proof :))
>
> One change I'd suggest is to not set hardcode `msmtp' in
> `feature-message', but rather set it if `feature-msmtp' is enabled?

Done.

>
> Because if one wants to use `feature-message' but not `msmtp' I guess
> that's a problem.
>
> Thanks for adding the serialization!
>
> --
> Best regards,
>
> Demis.



-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<87pmqiaj7y.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
I tried adding the rde-discuss and rde-devel mailing list to
feature-mailsettings. But I can't figure out what I should set as
URL. For example for rde-devel, I set
https://lists.sr.ht/~abcdw/rde-devel as the URL. But that doesn't seem
to be the correct url:

--8<---------------cut here---------------start------------->8---
> l2md --verbose
general.base = /home/db/.local/var/lib/l2md
general.mode = maildir
general.maildir = /home/db/.l2md/maildir
general.period = 180
repos.rde-devel.maildir = /home/db/mail/lists/~abcdw/rde-devel@lists.sr.ht/all
repos.rde-devel.initial_import = 0
repos.rde-devel.url = https://lists.sr.ht/~abcdw/rde-devel
repos.rde-devel.oid = [unknown]
repos.rde-discuss.maildir = /home/db/mail/lists/~abcdw/rde-discuss@lists.sr.ht/all
repos.rde-discuss.initial_import = 0
repos.rde-discuss.url = https://lists.sr.ht/~abcdw/rde-discuss
repos.rde-discuss.oid = [unknown]
oneshot = 1
Initial repository check.
Cloning: https://lists.sr.ht/~abcdw/rde-devel
Cannot clone git repo: unexpected http status code: 404
--8<---------------cut here---------------end--------------->8---

--
Best regards,
Demis Balbach
Details
Message ID
<87ee6xlwqo.fsf@trop.in>
In-Reply-To
<87pmqiaj7y.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-11-29 19:51, Demis Balbach wrote:

> I tried adding the rde-discuss and rde-devel mailing list to
> feature-mailsettings. But I can't figure out what I should set as
> URL. For example for rde-devel, I set
> https://lists.sr.ht/~abcdw/rde-devel as the URL. But that doesn't seem
> to be the correct url:
>
> --8<---------------cut here---------------start------------->8---
>> l2md --verbose
> general.base = /home/db/.local/var/lib/l2md
> general.mode = maildir
> general.maildir = /home/db/.l2md/maildir
> general.period = 180
> repos.rde-devel.maildir = /home/db/mail/lists/~abcdw/rde-devel@lists.sr.ht/all
> repos.rde-devel.initial_import = 0
> repos.rde-devel.url = https://lists.sr.ht/~abcdw/rde-devel
> repos.rde-devel.oid = [unknown]
> repos.rde-discuss.maildir = /home/db/mail/lists/~abcdw/rde-discuss@lists.sr.ht/all
> repos.rde-discuss.initial_import = 0
> repos.rde-discuss.url = https://lists.sr.ht/~abcdw/rde-discuss
> repos.rde-discuss.oid = [unknown]
> oneshot = 1
> Initial repository check.
> Cloning: https://lists.sr.ht/~abcdw/rde-devel
> Cannot clone git repo: unexpected http status code: 404
> --8<---------------cut here---------------end--------------->8---
>
> --
> Best regards,
> Demis Balbach

SourceHut doesn't expose public-inbox AFAIK:
https://public-inbox.org/README.html
https://git.kernel.org/pub/scm/linux/kernel/git/dborkman/l2md.git/about/

You can subscribe to mailing list and if you need to download the
archive as mbox, however it would be could if it had public-inbox, so
everyone can download archive and/or tarcking mailing list with l2md
without subscribing to it.

-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<871r2w9pjy.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
> You can subscribe to mailing list and if you need to download the
> archive as mbox, however it would be could if it had public-inbox, so
> everyone can download archive and/or tarcking mailing list with l2md
> without subscribing to it.

Thank you for clarifying that.

I stumbled upon another issue with the current setup. I think
`feature-notmuch' isn't capable of handling `archive' tags. Looking
through the code, it seems like archiving a mail simply means removing
inbox and todo tags:
https://github.com/abcdw/rde/blob/master/rde/features/mail.scm#L734

This makes sense for your setup, because you don't have an archive
folder on Gmail. But Mailbox offers a archive folder by default:
https://i.imgur.com/pxlNe0u.png

So for me, archiving emails doesn't do anything. Ideally it would move
them to the archive folder. This works already with other tags like
`trash'.

However, your notmuch implementation is a little beyong my capabilities,
so I don't know if simply changing the line above to add an archive tag
would fix it or not.

--
Best regards / Mit freundlichen Grüßen,
Demis Balbach
Details
Message ID
<87o85zwd9n.fsf@trop.in>
In-Reply-To
<871r2w9pjy.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-12-01 18:56, Demis Balbach wrote:

>> You can subscribe to mailing list and if you need to download the
>> archive as mbox, however it would be could if it had public-inbox, so
>> everyone can download archive and/or tarcking mailing list with l2md
>> without subscribing to it.
>
> Thank you for clarifying that.
>
> I stumbled upon another issue with the current setup. I think
> `feature-notmuch' isn't capable of handling `archive' tags. Looking
> through the code, it seems like archiving a mail simply means removing
> inbox and todo tags:
> https://github.com/abcdw/rde/blob/master/rde/features/mail.scm#L734
>
> This makes sense for your setup, because you don't have an archive
> folder on Gmail. But Mailbox offers a archive folder by default:
> https://i.imgur.com/pxlNe0u.png
>
> So for me, archiving emails doesn't do anything. Ideally it would move
> them to the archive folder. This works already with other tags like
> `trash'.
>
> However, your notmuch implementation is a little beyong my capabilities,
> so I don't know if simply changing the line above to add an archive tag
> would fix it or not.
>
> --
> Best regards / Mit freundlichen Grüßen,
> Demis Balbach

Yep, aware of it, I'll rework this part of rde soon to make it much more
flexible and less hardcoded, please wait :)

-- 
Best regards,
Andrew Tropin
Details
Message ID
<87bl1x6c8m.fsf@trop.in>
In-Reply-To
<871r2w9pjy.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-12-01 18:56, Demis Balbach wrote:

>> You can subscribe to mailing list and if you need to download the
>> archive as mbox, however it would be could if it had public-inbox, so
>> everyone can download archive and/or tarcking mailing list with l2md
>> without subscribing to it.
>
> Thank you for clarifying that.
>
> I stumbled upon another issue with the current setup. I think
> `feature-notmuch' isn't capable of handling `archive' tags. Looking
> through the code, it seems like archiving a mail simply means removing
> inbox and todo tags:
> https://github.com/abcdw/rde/blob/master/rde/features/mail.scm#L734
>
> This makes sense for your setup, because you don't have an archive
> folder on Gmail. But Mailbox offers a archive folder by default:
> https://i.imgur.com/pxlNe0u.png
>
> So for me, archiving emails doesn't do anything. Ideally it would move
> them to the archive folder. This works already with other tags like
> `trash'.
>
> However, your notmuch implementation is a little beyong my capabilities,
> so I don't know if simply changing the line above to add an archive tag
> would fix it or not.
>
> --
> Best regards / Mit freundlichen Grüßen,
> Demis Balbach

I didn't have enough time today to work on refactoring tagging logic,
next two days are occupied by competition and workout.  Will come back
to this task next week.

-- 
Best regards,
Andrew Tropin
Details
Message ID
<87tufm193r.fsf@trop.in>
In-Reply-To
<871r2w9pjy.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-12-01 18:56, Demis Balbach wrote:

>> You can subscribe to mailing list and if you need to download the
>> archive as mbox, however it would be could if it had public-inbox, so
>> everyone can download archive and/or tarcking mailing list with l2md
>> without subscribing to it.
>
> Thank you for clarifying that.
>
> I stumbled upon another issue with the current setup. I think
> `feature-notmuch' isn't capable of handling `archive' tags. Looking
> through the code, it seems like archiving a mail simply means removing
> inbox and todo tags:
> https://github.com/abcdw/rde/blob/master/rde/features/mail.scm#L734
>
> This makes sense for your setup, because you don't have an archive
> folder on Gmail. But Mailbox offers a archive folder by default:
> https://i.imgur.com/pxlNe0u.png
>
> So for me, archiving emails doesn't do anything. Ideally it would move
> them to the archive folder. This works already with other tags like
> `trash'.
>
> However, your notmuch implementation is a little beyong my capabilities,
> so I don't know if simply changing the line above to add an archive tag
> would fix it or not.
>
> --
> Best regards / Mit freundlichen Grüßen,
> Demis Balbach

I did the following trick: Reamed all directory to archive directory,
both in email accounts and mailing lists synced with l2md, the tagging
logic still the same, but now everything should work for both GMail and
other mail providers having archive folder.

The configuration still looks a little hardcoded, but should work in
most cases.  I'll make config generator for notmuch more parametrized
later.

-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<87tufj6oba.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
Hello,

for me this isn't working. But maybe I'm doing something wrong here.
Nothing really has changed for me after pulling and reconfiguring.

After running `mbsync -a' I opened notmuch and git `G'. I place the
cursor on the email I want to move and hit `k', then let's say `d' for
Trash. The email disappears, I git `G' again - email stays disappeared.
I run `mbsync -a' again and login to my mail provider online, I see the
mail I moved in the Trash folder, it worked.

Not back in notmuch, if I select another email, hit `k', then `a' for
archive, email disappears, but if I hit `G' then, email appears again in
Inbox. Also run `mbsync -a' but the archive folder is still empty.

But I'm not entirely sure that this is a problem with rde, maybe I'm
doing something wrong.

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach
Demis Balbach <db@minikn.xyz>
Details
Message ID
<87r1an6o4y.fsf@minikn.xyz>
In-Reply-To
<87ilwopb07.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
Okay, forget what I just said.
It's working now alright. I think it was a problem with mailbox.org, not
with rde. I just renamed the archive folder online and renamed it again
back and now its working.

Weird issue but it wasn't related to rde. Sorry - and thanks!!

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach
Details
Message ID
<87h7bhg58y.fsf@trop.in>
In-Reply-To
<87r1an6o4y.fsf@minikn.xyz> (view parent)
DKIM signature
missing
Download raw message
On 2021-12-08 17:46, Demis Balbach wrote:

> Okay, forget what I just said.
> It's working now alright. I think it was a problem with mailbox.org, not
> with rde. I just renamed the archive folder online and renamed it again
> back and now its working.
>
> Weird issue but it wasn't related to rde. Sorry - and thanks!!

Good, let me know if something else will pop up.

-- 
Best regards,
Andrew Tropin
Demis Balbach <db@minikn.xyz>
Details
Message ID
<87a6h97iqm.fsf@minikn.xyz>
In-Reply-To
<87h7bhg58y.fsf@trop.in> (view parent)
DKIM signature
pass
Download raw message
On 2021-12-09 18:36, Andrew Tropin wrote:

> Good, let me know if something else will pop up.

Will do. Thanks. By the way, I love the email setup now. I started using
tags like you suggested in your video and cleaned my whole inbox
today. I really like this approach. So thankful for bringing it to my attention!

-- 
Best regards / Mit freundlichen Grüßen,
Demis Balbach
Reply to thread Export thread (mbox)