personal (5273B)
1 # vim: syntax=neomuttrc 2 # Receive 3 source secret 4 set imap_user=$my_personal_email 5 set imap_pass=$my_personal_pass_cmd 6 # What neomutt uses to access emails. Populated by `mbsync` 7 set folder = ~/.local/share/mail/$my_personal_email 8 # Draft emails 9 set postponed = +Drafts 10 # Trashed emails 11 set trash = +Trash 12 # Record sent emails (providers like Gmail do this automatically; mine doesn't) 13 set record = +Sent 14 set mbox = +Archive 15 16 # The setup with regular mutt 17 # Home inbox: 18 # set spool_file = +Inbox 19 # unmailboxes * 20 # mailboxes +Inbox +Archive +Drafts +Jobs +Sent +Trash +Spam 21 # 22 # But to use notmuch, I need to use virtual mailboxes: 23 # (it's on the wishlist - https://github.com/neomutt/neomutt/issues/742) 24 unmailboxes * 25 unvirtual-mailboxes * 26 virtual-mailboxes \ 27 "Inbox (P)" "notmuch://?query=folder:$my_personal_email/Inbox" \ 28 "Archive (2M) (P)" "notmuch://?query=folder:$my_personal_email/Archive and date:2M..today" \ 29 "Drafts (P)" "notmuch://?query=folder:$my_personal_email/Drafts" \ 30 "Follow-up (P)" "notmuch://?query=folder:/$my_personal_email/ and tag:followup" \ 31 "Jobs (P)" "notmuch://?query=folder:$my_personal_email/Jobs" \ 32 "Sent (P)" "notmuch://?query=folder:$my_personal_email/Sent" \ 33 "Trash (P)" "notmuch://?query=folder:$my_personal_email/Trash" \ 34 "Spam (P)" "notmuch://?query=folder:$my_personal_email/Spam" \ 35 "Archive (All) (P)" "notmuch://?query=folder:$my_personal_email/Archive" 36 37 # Home inbox: 38 set spool_file = "Inbox (P)" 39 40 # Caching emails 41 set header_cache = '~/.cache/neomutt/$my_personal_email/headers' 42 set message_cachedir = '~/.cache/neomutt/$my_personal_email/bodies' 43 44 # Send 45 set real_name=$my_name 46 set from=$my_personal_email 47 set sendmail="msmtp -a $my_personal_email" 48 set sendmail_wait = 0 49 alias me $realname <$my_personal_email> 50 set signature="" 51 set ssl_force_tls = yes 52 set ssl_starttls = yes 53 54 # Hook -- IMPORTANT! 55 account-hook $folder "set imap_user=$my_personal_email imap_pass=$my_personal_pass_cmd" 56 57 # Retrieve new email 58 macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email && notmuch-hook<enter>" "run mbsync to sync $my_personal_email" 59 macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_personal_email:INBOX,Sent && notmuch-hook<enter>" "run mbsync to sync all mail" 60 61 # Delete 62 macro index,pager d "\ 63 <delete-message>\ 64 <modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>" 65 66 # Actually delete 67 bind index,pager D purge-message 68 69 # Undelete 70 macro index,pager u "\ 71 <undelete-message>\ 72 <modify-labels-then-hide>-trash<enter>" 73 74 # Changing folders 75 macro index,pager gi "<change-vfolder>Inbox (P)<enter>" "go to Inbox" 76 macro index,pager ga "<change-vfolder>Archive (2M) (P)<enter>" "go to recent Archive" 77 macro index,pager gA "<change-vfolder>Archive (All) (P)<enter>" "go to Archive" 78 macro index,pager gd "<change-vfolder>Drafts (P)<enter>" "go to Drafts" 79 macro index,pager gj "<change-vfolder>Spam (P)<enter>" "go to Spam" 80 macro index,pager gt "<change-vfolder>Trash (P)<enter>" "go to Trash" 81 macro index,pager gs "<change-vfolder>Sent (P)<enter>" "go to Sent" 82 83 # Moving emails 84 macro index a "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Archive<enter>" "move mail to Archive" 85 macro index MA "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Archive<enter><sync-mailbox>" "move mail to Archive" 86 macro index MI "<modify-labels>+inbox -archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Inbox<enter><sync-mailbox>" "move mail to Inbox" 87 macro index MD "<modify-labels>-inbox -archive +draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Drafts<enter><sync-mailbox>" "move mail to Drafts" 88 macro index MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><tag-prefix><save-message>=Spam<enter><sync-mailbox>" "move mail to Spam" 89 macro index MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><tag-prefix><save-message>=Trash<enter><sync-mailbox>" "move mail to Trash" 90 macro index MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><tag-prefix><save-message>=Sent<enter><sync-mailbox>" "move mail to Sent" 91 macro pager a "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><save-message>=Archive<enter>" "move mail to Archive" 92 macro pager MA "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><save-message>=Archive<enter><sync-mailbox>" "move mail to Archive" 93 macro pager MI "<modify-labels>+inbox -archive -draft -spam -trash -sent -unread<enter><save-message>=Inbox<enter><sync-mailbox>" "move mail to Inbox" 94 macro pager MD "<modify-labels>-inbox -archive +draft -spam -trash -sent -unread<enter><save-message>=Drafts<enter><sync-mailbox>" "move mail to Drafts" 95 macro pager MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><save-message>=Spam<enter><sync-mailbox>" "move mail to Spam" 96 macro pager MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><save-message>=Trash<enter><sync-mailbox>" "move mail to Trash" 97 macro pager MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><save-message>=Sent<enter><sync-mailbox>" "move mail to Sent"