diff --git a/.config/alot/config b/.config/alot/config new file mode 100644 index 0000000..182ef09 --- /dev/null +++ b/.config/alot/config @@ -0,0 +1,85 @@ +editor_cmd = vim +#theme = tomorrow +theme = genofire_mini +#theme = genofire_mini_white +#theme = genofire +initial_command = search tag:flagged OR tag:inbox OR tag:important AND NOT tag:killed + +prefer_plaintext = true + +[index] +decrypt = false + +[bindings] + I = search NOT tag:killed AND NOT tag:sent AND NOT tag:junk AND NOT tag:ci AND NOT tag:mon + +[tags] + [[encrypted]] + translated = #⚷lockkeyclosed_lock_with_key + normal = '','', 'dark green', '', 'dark green', '' + [[signed]] + translated = ✔#✓🗸🗹🖒 + normal = '','', 'dark green', '', 'dark green', '' + [[sent]] + translated = 📨 + normal = '','', 'yellow', '', 'yellow', '' + [[replied]] + translated = ⤾ + normal = '','', 'yellow', '', 'yellow', '' + [[spam]] + translated = ☢ + normal = '','', 'dark red', '', 'dark red', '' + [[killed]] + translated = 🗑 + normal = '','', 'dark red', '', 'dark red', '' + [[draft]] + translated = 🖉 + normal = '','', 'yellow', '', 'yellow', '' + [[unread]] + translated = 📭 + normal = '','', 'yellow', '', 'yellow', '' + [[flagged]] + translated = ★ + normal = '','', 'yellow', '', 'yellow', '' + [[important]] + translated = ⚡ + normal = '','', 'yellow', '', 'yellow', '' + [[attachment]] + translated = 📎 + normal = '','', '', '', '', '' + +[accounts] + +[[geno]] +realname = Geno +address = geno@fireorbit.de +gpg_key = 386ED1BF848ABB4A6B4A3C45FC83907C125BC2BC +sendmail_command = msmtp --account=fireorbit -t +encrypt_by_default = all +sign_by_default = True +sent_box = maildir:///home/genofire/mail/fireorbit/Sent +draft_box = maildir:///home/genofire/mail/fireorbit/Drafts + [[[abook]]] + type = shellcommand + command = 'notmuch address --format=json date:1Y..' + regexp = '\[?{"name": "(?P.*)", "address": "(?P.+)", "name-addr": ".*"}[,\]]?' + shellcommand_external_filtering = False + +[[eg]] +realname = Testaccount +address = benutzername@gmail.com +gpg_key = GPG_KEY..... +sendmail_command = msmtp --account=smtp-accountname -t +encrypt_by_default = all +sign_by_default = True +sent_box = maildir:///home/genofire/mail/imap_eg/Sent +draft_box = maildir:///home/genofire/mail/imap_eg/Drafts +sent_tags = sent,dev +draft_tags = draft,dev +passed_tags = passed,dev +replied_tags = replied,dev + [[[abook]]] + type = shellcommand + command = 'notmuch address --format=json date:1Y..' + regexp = '\[?{"name": "(?P.*)", "address": "(?P.+)", "name-addr": ".*"}[,\]]?' + shellcommand_external_filtering = False diff --git a/.config/alot/themes/genofire b/.config/alot/themes/genofire new file mode 100644 index 0000000..3824ec5 --- /dev/null +++ b/.config/alot/themes/genofire @@ -0,0 +1,85 @@ +############################################################################### +# MUTT +# +# colour theme for alot. © 2012 Patrick Totzke, GNU GPL3+ +# https://github.com/pazz/alot +############################################################################### + +[global] + #footer = 'standout,bold','','light green,bold','dark blue','light green,bold','dark blue' + footer = 'standout','','white,bold','dark blue','white,bold','h16' + body = '','','white','','white','' + notify_error = 'standout','','white','dark red','white','dark red' + notify_normal = '','','white','black','white','#68a' + prompt = '','','white','black','white','h16' + tag = '','','yellow','','yellow','' + tag_focus = 'standout, bold','','yellow','','yellow','' +[help] + text = '','','white','dark gray','white','dark gray' + section = 'underline','','white,underline','dark gray','white,underline','dark gray' + title = 'standout','','white,underline','dark gray','white,underline','dark gray' +[bufferlist] + line_even = '','','white','','white','' + line_odd = '','','white','','white','' + line_focus = 'standout','','white','dark magenta','white','h13' +[namedqueries] + line_even = '','','white','','white','' + line_odd = '','','white','','white','' + line_focus = 'standout','','white','dark magenta','white','h13' +[taglist] + line_even = '','','white','','white','' + line_odd = '','','white','','white','' + line_focus = 'standout','','white','dark magenta','white','h13' +[thread] + arrow_heads = '','','dark red','black','dark red','black' + arrow_bars = '','','dark red','black','dark red','black' + attachment = '','','yellow,bold','black','yellow,bold','g15' + attachment_focus = 'standout','','black','yellow','black','yellow' + body = '','','white','','white','' + body_focus = '','','white','black','white','dark gray' + header = '','','dark cyan','black','dark cyan','g15' + header_key = '','','dark cyan','black','dark cyan','g15' + header_value = '','','dark cyan','black','dark cyan','g15' + + [[summary]] + even = '','','white','black','white','dark gray' + odd = '','','white','black','white','dark gray' + focus = 'standout','','white','dark magenta','white','h13' + +[envelope] + body = '','','white','','white','' + header = '','','dark cyan','black','dark cyan','g15' + header_key = '','','dark cyan','black','dark cyan','g15' + header_value = '','','dark cyan','black','dark cyan','g15' +[search] + [[threadline]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + parts = date,authors,mailcount,subject,tags + [[[date]]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'fit',10,10 + alignment = right + [[[mailcount]]] + # normal = '','','white','black','white','default' + normal = '','','light blue','','h12','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'fit', 4, 4 + alignment = right + [[[tags]]] + normal = 'bold','','dark cyan','','h14','' + focus = 'standout','','white','dark magenta','white','h13' + [[[authors]]] + normal = 'default,underline','','yellow','default','h16','' + #normal = '','','yellow','black','yellow','black' + focus = 'standout','','white','dark magenta','white','h13' + width = 'fit',25,25 + [[[subject]]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'weight', 1 + [[[content]]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'weight', 1 diff --git a/.config/alot/themes/genofire_mini b/.config/alot/themes/genofire_mini new file mode 100644 index 0000000..76320db --- /dev/null +++ b/.config/alot/themes/genofire_mini @@ -0,0 +1,85 @@ +############################################################################### +# MUTT +# +# colour theme for alot. © 2012 Patrick Totzke, GNU GPL3+ +# https://github.com/pazz/alot +############################################################################### + +[global] + #footer = 'standout,bold','','light green,bold','dark blue','light green,bold','dark blue' + footer = 'standout','','white,bold','dark blue','white,bold','#f60' + body = '','','white','','white','' + notify_error = 'standout','','white','dark red','white','dark red' + notify_normal = '','','white','black','white','#68a' + prompt = '','','white','black','white','#f60' + tag = '','','yellow','','yellow','' + tag_focus = 'standout, bold','','yellow','','yellow','' +[help] + text = '','','white','dark gray','white','dark gray' + section = 'underline','','white,underline','dark gray','white,underline','dark gray' + title = 'standout','','white,underline','dark gray','white,underline','dark gray' +[bufferlist] + line_even = '','','white','','white','' + line_odd = '','','white','','white','' + line_focus = 'standout','','white','dark magenta','white','h13' +[namedqueries] + line_even = '','','white','','white','' + line_odd = '','','white','','white','' + line_focus = 'standout','','white','dark magenta','white','h13' +[taglist] + line_even = '','','white','','white','' + line_odd = '','','white','','white','' + line_focus = 'standout','','white','dark magenta','white','h13' +[thread] + arrow_heads = '','','dark red','black','dark red','black' + arrow_bars = '','','dark red','black','dark red','black' + attachment = '','','yellow,bold','black','yellow,bold','g15' + attachment_focus = 'standout','','black','yellow','black','yellow' + body = '','','white','','white','' + body_focus = '','','white','black','white','dark gray' + header = '','','dark cyan','black','dark cyan','g15' + header_key = '','','dark cyan','black','dark cyan','g15' + header_value = '','','dark cyan','black','dark cyan','g15' + + [[summary]] + even = '','','white','black','white','dark gray' + odd = '','','white','black','white','dark gray' + focus = 'standout','','white','dark magenta','white','h13' + +[envelope] + body = '','','white','','white','' + header = '','','dark cyan','black','dark cyan','g15' + header_key = '','','dark cyan','black','dark cyan','g15' + header_value = '','','dark cyan','black','dark cyan','g15' +[search] + [[threadline]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + parts = date,authors,mailcount,subject,tags + [[[date]]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'fit',10,10 + alignment = right + [[[mailcount]]] + # normal = '','','white','black','white','default' + normal = '','','light blue','','h12','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'fit', 4, 4 + alignment = right + [[[tags]]] + normal = 'bold','','dark cyan','','h14','' + focus = 'standout','','white','dark magenta','white','h13' + [[[authors]]] + normal = 'default,underline','','yellow','default','#f60','' + #normal = '','','yellow','black','yellow','black' + focus = 'standout','','white','dark magenta','white','h13' + width = 'fit',25,25 + [[[subject]]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'weight', 1 + [[[content]]] + normal = '','','white','','white','' + focus = 'standout','','white','dark magenta','white','h13' + width = 'weight', 1 diff --git a/.config/alot/themes/genofire_mini_white b/.config/alot/themes/genofire_mini_white new file mode 100644 index 0000000..301c72d --- /dev/null +++ b/.config/alot/themes/genofire_mini_white @@ -0,0 +1,85 @@ +############################################################################### +# MUTT +# +# colour theme for alot. © 2012 Patrick Totzke, GNU GPL3+ +# https://github.com/pazz/alot +############################################################################### + +[global] + #footer = 'standout,bold','','light green,bold','dark blue','light green,bold','dark blue' + footer = 'standout','','black,bold','dark blue','black,bold','#f60' + body = '','','black','','black','' + notify_error = 'standout','','black','dark red','black','dark red' + notify_normal = '','','black','white','black','#68a' + prompt = '','','black','white','black','#f60' + tag = '','','yellow','','yellow','' + tag_focus = 'standout, bold','','yellow','','yellow','' +[help] + text = '','','black','dark gray','black','dark gray' + section = 'underline','','black,underline','dark gray','black,underline','dark gray' + title = 'standout','','black,underline','dark gray','black,underline','dark gray' +[bufferlist] + line_even = '','','black','','black','' + line_odd = '','','black','','black','' + line_focus = 'standout','','black','dark magenta','black','h13' +[namedqueries] + line_even = '','','black','','black','' + line_odd = '','','black','','black','' + line_focus = 'standout','','black','dark magenta','black','h13' +[taglist] + line_even = '','','black','','black','' + line_odd = '','','black','','black','' + line_focus = 'standout','','black','dark magenta','black','h13' +[thread] + arrow_heads = '','','dark red','white','dark red','white' + arrow_bars = '','','dark red','white','dark red','white' + attachment = '','','yellow,bold','white','yellow,bold','g15' + attachment_focus = 'standout','','white','yellow','white','yellow' + body = '','','black','','black','' + body_focus = '','','black','white','black','dark gray' + header = '','','dark cyan','white','dark cyan','g15' + header_key = '','','dark cyan','white','dark cyan','g15' + header_value = '','','dark cyan','white','dark cyan','g15' + + [[summary]] + even = '','','black','white','black','dark gray' + odd = '','','black','white','black','dark gray' + focus = 'standout','','black','dark magenta','black','h13' + +[envelope] + body = '','','black','','black','' + header = '','','dark cyan','white','dark cyan','g15' + header_key = '','','dark cyan','white','dark cyan','g15' + header_value = '','','dark cyan','white','dark cyan','g15' +[search] + [[threadline]] + normal = '','','black','','black','' + focus = 'standout','','black','dark magenta','black','h13' + parts = date,authors,mailcount,subject,tags + [[[date]]] + normal = '','','black','','black','' + focus = 'standout','','black','dark magenta','black','h13' + width = 'fit',10,10 + alignment = right + [[[mailcount]]] + # normal = '','','black','white','black','default' + normal = '','','light blue','','h12','' + focus = 'standout','','black','dark magenta','black','h13' + width = 'fit', 4, 4 + alignment = right + [[[tags]]] + normal = 'bold','','dark cyan','','h14','' + focus = 'standout','','black','dark magenta','black','h13' + [[[authors]]] + normal = 'default,underline','','yellow','default','#f60','' + #normal = '','','yellow','white','yellow','white' + focus = 'standout','','black','dark magenta','black','h13' + width = 'fit',25,25 + [[[subject]]] + normal = '','','black','','black','' + focus = 'standout','','black','dark magenta','black','h13' + width = 'weight', 1 + [[[content]]] + normal = '','','black','','black','' + focus = 'standout','','black','dark magenta','black','h13' + width = 'weight', 1 diff --git a/.config/systemd/user/mail.service b/.config/systemd/user/mail.service new file mode 100644 index 0000000..603fb3a --- /dev/null +++ b/.config/systemd/user/mail.service @@ -0,0 +1,9 @@ +[Unit] +Description=Fetch mails + +[Service] +ExecStart=/usr/bin/notmuch new -q +Type=oneshot + +[Install] +WantedBy=multi-user.target diff --git a/.config/systemd/user/mail.timer b/.config/systemd/user/mail.timer new file mode 100644 index 0000000..50da127 --- /dev/null +++ b/.config/systemd/user/mail.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Fetch every 5min + +[Timer] +OnBootSec=15min +OnUnitActiveSec=5min + +[Install] +WantedBy=timers.target diff --git a/.local/bin/mailnotify b/.local/bin/mailnotify new file mode 100755 index 0000000..ab929bf --- /dev/null +++ b/.local/bin/mailnotify @@ -0,0 +1,12 @@ +#!/bin/sh +SEARCH=${1:-"tag:new"} +SORT="newest-first" + +for row in $(notmuch search --format=json --output=summary --sort="$SORT" "$SEARCH" | jq -r '.[] | @base64'); do + _jq() { + echo ${row} | base64 --decode | jq -r ${1} + } + + notify-send -i "applications-email-panel" "$(_jq '.subject')" "$(_jq '.authors') - $(_jq '.matched')/$(_jq '.total')\ + \n$(_jq '-j .tags')" +done diff --git a/.mailcap b/.mailcap new file mode 100644 index 0000000..3906763 --- /dev/null +++ b/.mailcap @@ -0,0 +1 @@ +text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput diff --git a/.mbsyncrc b/.mbsyncrc new file mode 100644 index 0000000..097cdb7 --- /dev/null +++ b/.mbsyncrc @@ -0,0 +1,55 @@ +# Globale Optionen +# ---------------- + +# Auch löschen +Expunge Both + +# Fehlende Mailboxen anlegen +Create Both + +# Statusdateien im Maildir +SyncState * + +# ---------------------------------------------- # + +IMAPAccount account_fireorbit +Host mail.sum7.eu +User geno@fireorbit.de +PassCmd "pass mail/post.sum7.eu | head -1" +SSLType IMAPS +#SSLVersions TLSv1.2 +#CertificateFile ~/.letsencrypt-x3.pem + +MaildirStore maildir_fireorbit +Path ~/mail/fireorbit/ +Inbox ~/mail/fireorbit-inbox +SubFolders Verbatim + +IMAPStore imap_fireorbit +Account account_fireorbit + +Channel channel_fireorbit +Master :imap_fireorbit: +Slave :maildir_fireorbit: +Patterns * + +# ---------------------------------------------- # + +IMAPAccount account_imap +Host imap.server.de +User "benutzername@gmail.com" +Pass "passwort" +SSLType IMAPS + +MaildirStore maildir_imap_eg +Path ~/mail/imap_eg/ +Inbox ~/mail/imap_eg-inbox +SubFolders Verbatim + +IMAPStore imap_imap_eg +Account account_imap_eg + +Channel channel_imap_eg +Master :imap_imap_eg: +Slave :maildir_imap_eg: +Patterns * diff --git a/.msmtprc b/.msmtprc new file mode 100644 index 0000000..d044b6d --- /dev/null +++ b/.msmtprc @@ -0,0 +1,17 @@ +defaults +auth on +tls on + +account fireorbit +host mail.sum7.eu +port 587 +user geno@fireorbit.de +passwordeval "pass mail/post.sum7.eu | head -1" + +account smtp-accountname +host smtp.server.de +port 587 +user benutzername@gmail.com +password "passwort" + +account default : fireorbit diff --git a/ .notmuch-config b/.notmuch-config similarity index 100% rename from .notmuch-config rename to .notmuch-config diff --git a/mail/.notmuch/hooks/post-new b/mail/.notmuch/hooks/post-new new file mode 100755 index 0000000..5182bae --- /dev/null +++ b/mail/.notmuch/hooks/post-new @@ -0,0 +1,43 @@ +#!/bin/sh +notmuch tag --batch <<-EOF + +list +ccc-intern +ccc -- thread:"{tag:new and to:intern@lists.ccc.de}" + +list +ccchb +ccc -- thread:"{tag:new and to:ccc@lists.ccchb.de}" + +list +ffhb -- thread:"{tag:new and to:liste@bremen.freifunk.net}" + +list -- thread:"{tag:new and from:mailman}" + +dev +github -- thread:"{tag:new and from:@github.com}" + +dev +gitlab -- thread:"{tag:new and from:@mg.gitlab.com}" + +dev -- thread:"{tag:new and from:dev@sum7.eu}" + +dev -- thread:"{tag:new and to:+dev@}" + +dev +ci -- thread:"{tag:new and from:dev@sum7.eu and subject:Pipeline}" + +dev +ci -- thread:"{tag:new and to:+dev@ and subject:Pipeline}" + +dev +ci -- thread:"{tag:new and from:builds@circleci.com}" + +mon -- thread:"{tag:new and to:+mon@}" + +mon -- thread:"{tag:new and to:arch-security@archlinux.org}" + +host -- thread:"{tag:new and to:+host@}" + +ccc -- thread:"{tag:new and to:+ccc@}" + +junk -- thread:"{tag:new and folder:fireorbit/Junk}" +EOF + +# set it for notification +~/.local/bin/mailnotify + +notmuch tag -new tag:new +notmuch tag -inbox tag:inbox not tag:unread + +echo "MOVE MAILS TO FOLDER BY TAGS:" + +## move folders +echo "> junk" +notmuch search --output=files tag:junk \ + and not folder:fireorbit/Junk | grep -v ~/mail/fireorbit/old | grep -v ~/mail/h | mrefile -v ~/mail/fireorbit/Junk + +echo "> inbox (no junk)" +notmuch search --output=files not tag:junk \ + and folder:fireorbit/Junk | grep -v ~/mail/fireorbit/old | grep -v ~/mail/h | mrefile -v ~/mail/fireorbit-inbox + +echo "> trash" +notmuch search --output=files tag:killed \ + and not tag:junk \ + and not folder:fireorbit/Trash | grep -v ~/mail/fireorbit/old | grep -v ~/mail/h | mrefile -v ~/mail/fireorbit/Trash + +mbsync -a -H diff --git a/mail/.notmuch/hooks/pre-new b/mail/.notmuch/hooks/pre-new new file mode 100755 index 0000000..003b3bd --- /dev/null +++ b/mail/.notmuch/hooks/pre-new @@ -0,0 +1,10 @@ +#!/bin/sh +notmuch tag -unread tag:unread not tag:inbox + +mbsync -a -L +#msg=$(mbsync -a -L 2>&1) +#echo "$msg"; +# +#if [ 0 -ne $? ]; then +# notify-send -u critical -i "applications-email-panel" "Failed Mail fetch" "$msg"; +#fi