clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

trying a screener with mutt

sspaeti 28ecf3c7 c3fc55a1

+85 -5
+13
mutt/generate_pattern.sh
··· 1 + #!/bin/bash 2 + 3 + file="$HOME/.config/mutt/screen_out.txt" 4 + 5 + pattern="" 6 + while IFS= read -r email; do 7 + # Escape any periods in email addresses 8 + email="${email//./\\.}" 9 + pattern="${pattern}!~f ${email} " 10 + done < "$file" 11 + 12 + # Print out the pattern 13 + echo "$pattern"
+13
mutt/generate_pattern_in.sh
··· 1 + #!/bin/bash 2 + 3 + file="$HOME/.config/mutt/screened_in.txt" 4 + 5 + pattern="" 6 + while IFS= read -r email; do 7 + # Escape any periods in email addresses 8 + email="${email//./\\.}" 9 + pattern="${pattern}!~f ${email} " 10 + done < "$file" 11 + 12 + # Print out the pattern 13 + echo "$pattern"
+53 -5
mutt/muttrc
··· 7 7 # set imap_pass = "password" 8 8 source ~/.dotfiles/zsh/.secret.muttrc 9 9 10 - 11 10 set from = "simu@sspaeti.com" 12 11 set realname = "Simon Späti" 13 12 14 - set spoolfile = "+INBOX" 13 + set spoolfile = "+Inbox" 15 14 set record = "+Sent" 16 15 set trash = "+Trash" 17 16 set postponed = "+Drafts" ··· 20 19 set ssl_starttls = yes 21 20 set ssl_force_tls = yes 22 21 23 - mailboxes =INBOX =Waiting =Scheduled =Someday =Sent =Trash =Drafts =Junk =Archive =Others 22 + mailboxes =Inbox =ScreenedIn =Waiting =Scheduled =Someday =Sent =Trash =Drafts =Junk =Archive =Others =ScreenedOut 23 + 24 + 25 + # SCREENER 26 + # handling screening of senders (hide not important senders out of my inbox) 27 + # --> ignored emails are in .secret.muttrc above, but these are not moved to folder, just ignored in inbox 28 + 29 + # Define a pattern for filtering emails from the specified sender 30 + # pattern index,sent,browser "from:"jack@jacksflightclub\.com "ScreenedOut" 31 + 32 + 33 + # # Define a macro to mark matching emails for deletion 34 + # macro index,pager X "|~b %s^$sender@example\.com\n" "Mark emails from sender@example.com for deletion" 35 + 36 + # # Redirect marked emails to the "Blocked" folder (change the folder name if needed) 37 + # folder-hook . 'push -f +ScreenedOut ~b $sender@example\.com' 38 + 39 + 40 + 41 + # macro index O "<save-message>+ScreenedOut<enter>" "Screen out this email" 42 + 43 + # macro index,pager O "<save-message>=ScreenedOut<enter><next-undeleted>" "Screen out based on list" 44 + # macro index,pager A "<save-message>=Inbox<enter><next-undeleted>" "Accept based on list" 45 + # macro index,pager L ":limit ~f `cat ~/.config/mutt/screen_out.txt | tr '\n' '|'`<enter>" "Limit view to screen-out list" 46 + # macro index,pager U ":unlimit<enter>" "Remove limit" 47 + # :set limit="~f `cat ~/.config/mutt/screen_out.txt | tr '\n' '|' | sed 's/|$//'`" 48 + # macro index L ":exec pattern ~f `cat ~/.config/mutt/screen_out.txt | tr '\n' '|' | sed 's/|$//'`<enter>" "Limit view to screen-out list" 49 + # macro index U ":exec pattern .<enter>" "Remove limit" 50 + 51 + # macro index,pager L "T!~f bla@bla\.com !~f no-reply@dsb-email\.dk<enter>" "Exclude emails from two addresses" 52 + 53 + macro index,pager L "T`~/.config/mutt/generate_pattern.sh`<enter>" "Exclude emails from screen_out.txt" 54 + macro index,pager O "T`~/.config/mutt/generate_pattern_in.sh`<enter>" "Select accepted emails from screen_in.txt" 55 + 24 56 25 57 # Where to put the stuff 26 58 set header_cache = "~/.cache/mutt/headers" ··· 68 100 bind pager k previous-line 69 101 bind pager l view-attachments 70 102 bind index D delete-message 71 - bind index U undelete-message 72 - bind index L limit 103 + # bind index U undelete-message 104 + # bind index L limit 73 105 bind index h noop 74 106 bind index l display-message 75 107 bind index,query <space> tag-entry ··· 93 125 bind pager \005 next-line # Mouse wheel 94 126 bind editor <Tab> complete-query 95 127 128 + 129 + 130 + 96 131 macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox" 97 132 macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox" 98 133 macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox" ··· 111 146 macro index,pager ga "<change-folder>=Archive<enter>" "go to archive" 112 147 macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive" 113 148 macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive" 149 + 150 + macro index,pager gw "<change-folder>=Waiting<enter>" "go to waiting" 151 + macro index,pager Mw ";<save-message>=Waiting<enter>" "move mail to waiting" 152 + macro index,pager Cw ";<copy-message>=Waiting<enter>" "copy mail to waiting" 153 + 154 + 155 + macro index,pager gg "<change-folder>=ScreenedIn<enter>" "go to screened in" 156 + macro index,pager Mg ";<save-message>=ScreenedIn<enter>" "move mail to screened in" 157 + 158 + macro index,pager go "<change-folder>=ScreenedOut<enter>" "go to screened out" 159 + macro index,pager Mo ";<save-message>=ScreenedOut<enter>" "move mail to screened out" 160 + 161 + macro index,pager gl "<show-log-messages><enter>" "go to log messages" 114 162 115 163 # Sidebar mappings 116 164 set sidebar_visible = yes
+4
mutt/screen_out.txt
··· 1 + bla@bla.com 2 + no-reply@dsb-email.dk 3 + mail@barbannews.com 4 + info@i.drop.com
+2
mutt/screened_in.txt
··· 1 + simu@sspaeti.com 2 + sbbclient@order.info.sbb.ch