dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

school (5002B)


      1 # vim: syntax=neomuttrc
      2 # Receive
      3 source secret
      4 set imap_user=$my_school_username
      5 set imap_pass=$my_school_pass_id
      6 set folder = ~/.local/share/mail/$my_school_email/
      7 set postponed = +Drafts
      8 set trash = +"Deleted Items"
      9 set record = ""     # office365 automatically saves sent mail
     10 set mbox = +Archive
     11 
     12 
     13 # unmailboxes *
     14 # mailboxes +Inbox +Archive +Drafts +"Sent Items" +"Deleted Items" +"Junk Email"
     15 # set spoolfile = +Inbox
     16 # For notmuch:
     17 unmailboxes *
     18 unvirtual-mailboxes *
     19 virtual-mailboxes \
     20   "Inbox (S)" "notmuch://?query=folder:$my_school_email/Inbox" \
     21   "Archive (2M) (S)" "notmuch://?query=folder:$my_school_email/Archive and date:2M..today" \
     22   "Drafts (S)" "notmuch://?query=folder:$my_school_email/Drafts" \
     23   "Follow-up (S)" "notmuch://?query=folder:/$my_school_email/ and tag:followup" \
     24   "Sent (S)" "notmuch://?query='folder:\"$my_school_email/Sent Items\"'" \
     25   "Trash (S)" "notmuch://?query='folder:\"$my_school_email/Deleted Items\"'" \
     26   "Spam (S)" "notmuch://?query='folder:\"$my_school_email/Junk Email\"'" \
     27   "Archive (All) (S)" "notmuch://?query=folder:$my_school_email/Archive"
     28 
     29 set spool_file = "Inbox (S)"
     30 
     31 set header_cache = ~/.cache/neomutt/$my_school_email/headers
     32 set message_cachedir = ~/.cache/neomutt/$my_school_email/bodies
     33 
     34 # Send
     35 set real_name=$my_name
     36 set from=$my_school_email
     37 set sendmail="msmtp -a $my_school_email"
     38 set sendmail_wait = 0
     39 alias me $realname <$my_school_email>
     40 set signature=""
     41 set ssl_force_tls = yes
     42 set ssl_starttls = yes
     43 
     44 # Hook -- IMPORTANT!
     45 account-hook $folder "set imap_user=$my_school_email imap_pass=$my_school_pass_cmd"
     46 
     47 # Retrieve new email
     48 macro index O "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email && notmuch-hook<enter>" "run mbsync to sync $my_school_email"
     49 macro index o "<shell-escape>mbsync -c ~/.config/mbsync/mbsyncrc $my_school_email:INBOX,'Sent Items' && notmuch-hook<enter>" "run mbsync to sync all mail"
     50 
     51 # Delete
     52 macro index,pager d "\
     53 <delete-message>\
     54 <modify-labels-then-hide>-inbox -archive -draft -spam +trash -sent -unread<enter>"
     55 
     56 # Actually delete
     57 bind index,pager D purge-message
     58 
     59 # Undelete
     60 macro index,pager u "\
     61 <undelete-message>\
     62 <modify-labels-then-hide>-trash<enter>"
     63 
     64 # Changing folders
     65 macro index,pager gi "<change-vfolder>Inbox (S)<enter>" "go to Inbox"
     66 macro index,pager ga "<change-vfolder>Archive (2M) (S)<enter>" "go to recent Archive"
     67 macro index,pager gA "<change-vfolder>Archive (All) (S)<enter>" "go to Archive"
     68 macro index,pager gd "<change-vfolder>Drafts (S)<enter>" "go to Drafts"
     69 macro index,pager gj "<change-vfolder>Spam (S)<enter>" "go to Spam"
     70 macro index,pager gt "<change-vfolder>Trash (S)<enter>" "go to Trash"
     71 macro index,pager gs "<change-vfolder>Sent (S)<enter>" "go to Sent"
     72 
     73 # Moving emails
     74 macro index a "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><tag-prefix><save-message>=Archive<enter>" "move mail to Archive"
     75 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"
     76 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"
     77 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"
     78 macro index MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><tag-prefix><save-message>=Junk Email<enter><sync-mailbox>" "move mail to Junk Email"
     79 macro index MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><tag-prefix><save-message>=Deleted Items<enter><sync-mailbox>" "move mail to Deleted Items"
     80 macro index MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><tag-prefix><save-message>=Sent Items<enter><sync-mailbox>" "move mail to Sent Items"
     81 macro pager a "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><save-message>=Archive<enter>" "move mail to Archive"
     82 macro pager MI "<modify-labels>+inbox -archive -draft -spam -trash -sent -unread<enter><save-message>=Inbox<enter><sync-mailbox>" "move mail to Inbox"
     83 macro pager MA "<modify-labels>-inbox +archive -draft -spam -trash -sent -unread<enter><save-message>=Archive<enter><sync-mailbox>" "move mail to Archive"
     84 macro pager MD "<modify-labels>-inbox -archive +draft -spam -trash -sent -unread<enter><save-message>=Drafts<enter><sync-mailbox>" "move mail to Drafts"
     85 macro pager MJ "<modify-labels>-inbox -archive -draft +spam -trash -sent -unread<enter><save-message>=Junk Email<enter><sync-mailbox>" "move mail to Junk Email"
     86 macro pager MT "<modify-labels>-inbox -archive -draft -spam +trash -sent -unread<enter><save-message>=Deleted Items<enter><sync-mailbox>" "move mail to Deleted Items"
     87 macro pager MS "<modify-labels>-inbox -archive -draft -spam -trash +sent -unread<enter><save-message>=Sent Items<enter><sync-mailbox>" "move mail to Sent Items"