reddit / emacs

Mu4e, Items from Sent Items appear in Inbox

dracu4s · 2022-03-29 14:04
Hello Guys, i just finished my config of Mu4e for my work mail. I synced everything with offlineimap and indexed the folder with mu. When i open Inbox, some mails from Sent Items also appear in there. First i thought i have opened a bookmark or so, but this is not the Case. In the Bottom it says: 'R maildir:"/INBOX"'. When i open an email, the ones actually located in inbox have "Maildir: /INBOX" in the header. But i also have mails with "Maildir: /Sent Items" in the Header. Those emails are not send via emacs, but from my previous client. Here is my init.el mu4e part. (use-package mu4e :ensure nil ;; :load-path "/usr/share/emacs/site-lisp/mu4e/" ;; :defer 20 ; Wait until 20 seconds after startup :config ;; This is set to 't' to avoid mail syncing issues when using mbsync (setq mu4e-change-filenames-when-moving t) ;; Refresh mail using isync every 10 minutes (setq mu4e-update-interval (* 5 60)) (setq mu4e-get-mail-command "offlineimap -c /home/user/.offlineimaprc") (setq mu4e-maildir "~/.mail/workmail") (setq user-mail-address "workmail") (setq mu4e-drafts-folder "/Drafts") (setq mu4e-sent-folder "/Sent Items") (setq mu4e-refile-folder "/INBOX.2022") (setq mu4e-trash-folder "/Deleted Items") (setq mu4e-maildir-shortcuts '(("/INBOX" . ?i) ("/Sent Items" . ?s) ("/Deleted Items" . ?d) )) (mu4e t) )
dracu4s · 2022-03-29 14:42
Something i would like to mention is a strange behaviour. When i go to Sent Items in Emacs, i get a list of all mails sent. Also the mails that appear in my inbox. However, when i run a search query with mu, i get no results for any folder with a space in the name. Example: `mu find maildir:'/INBOX'` \-> I get all mails in my Inbox `mu find maildir:'/Sent Items'` \-> No matches for search expression I tried different variations: `mu find maildir:"/Sent Items"` `mu find maildir:/"Sent Items"` `mu find "maildir:/Sent Items"` All results are empty. These Variations however gives me results when going on Inbox. I tried the same thing with Deleted Items... When i look in the File System, i can see 1577 items in the "Sent Items/cur" Folder... ​ Also something i also noticed. In emacs i get 450 Items in Inbox, with mu, i get 374. I also just saw in the overview of mu4e, that there are 82/374, so 82 unread messages from 374 in total.
dracu4s · 2022-03-29 15:14
This might be the dumbest mistake i had. I changed my mailbox folder names to english, since the german names have special characters. I changed all the config files and adjusted everything. The problem was, i didnt restart emacs fully. I had the emacs daemon running, and didnt kill it. So the new init.el file didnt load. I am quite new to emacs, so i need to adapt things... For anyone having similar problems, its because mu4e couldnt find the right files, and it looks like the mail is in inbox without context. Now as i changed everything and restarted, i also see responding mails correctly linked to it.
Gallipo · 2022-03-30 10:26
Also mu4e has an option to show "related" mails. Those are mails in reply to a mail that matches the search. The function `'mu4e-headers-toggle-include-related` (by default bound to the key `W` in headers- or message-view) toggles that behavior. And there is a custom variable `mu4e-headers-include-related` one can set in .emacs