Просмотр исходного кода

Merge branch 'master' into master

tags/v3.1
Ayman Bagabas 5 лет назад
committed by GitHub
Родитель
Сommit
9ce96c9a40
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
6 измененных файлов: 72 добавлений и 22 удалений
  1. +1
    -1
      README.md
  2. +8
    -5
      bin/mailsync
  3. +4
    -3
      bin/mw
  4. +55
    -10
      share/domains.csv
  5. +1
    -1
      share/mailcap
  6. +3
    -2
      share/mutt-wizard.muttrc

+ 1
- 1
README.md Просмотреть файл

@@ -81,7 +81,7 @@ To give you an example of the interface, here's an idea:

- `isync`/`mbsync` has replaced `offlineimap` as the backend. Offlineimap was error-prone, bloated, used obsolete Python 2 modules and required separate steps to install the system.
- `mw` is now an installed program instead of just a script needed to be kept in your mutt folder.
- `dialog` is no long used (le bloat) and the interface is simply text commands.
- `dialog` is no longer used (le bloat) and the interface is simply text commands.
- More autogenerated shortcuts that allow quickly moving and copying mail between boxes.
- More elegant attachment handling. Image/video/pdf attachments without relying on the neomutt instance.
- abook integration by default.


+ 8
- 5
bin/mailsync Просмотреть файл

@@ -1,17 +1,20 @@
#!/usr/bin/env sh
# Sync mail and give notification if there is new mail.

export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
export DISPLAY=:0.0
[ -d "$HOME/.local/share/password-store" ] && export PASSWORD_STORE_DIR="$HOME/.local/share/password-store"

# Run only if user logged in (prevent cron errors)
pgrep -u "$USER" >/dev/null || exit
pgrep -u "$USER" >/dev/null || { echo "$USER not logged in; sync will not run."; exit ;}
# Run only if not already running in other instance
pgrep -x mbsync >/dev/null && exit
pgrep -x mbsync >/dev/null && { echo "mbsync is already running." ; exit ;}

# Checks for internet connection and set notification script.
ping -q -c 1 1.1.1.1 > /dev/null || exit
ping -q -c 1 1.1.1.1 > /dev/null || { echo "No internet connection detected."; exit ;}
command -v notify-send >/dev/null || echo "Note that \`libnotify\` or \`libnotify-send\` should be installed for pop-up mail notifications with this script."

export DISPLAY=:0.0

# Settings are different for MacOS (Darwin) systems.
if [ "$(uname)" = "Darwin" ]; then
notify() { osascript -e "display notification \"$2 in $1\" with title \"You've got Mail\" subtitle \"Account: $account\"" && sleep 2 ;}


+ 4
- 3
bin/mw Просмотреть файл

@@ -22,7 +22,7 @@ muttrc="$muttdir/muttrc"
msmtprc="$HOME/.config/msmtp/config"
ssltype="IMAPS" # This is later changed to `None` later in the script if using Protonmail

for x in "/etc/ssl/certs/ca-certificates.crt" "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/ca-bundle.pem" "/etc/pki/tls/cacert.pem" "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" "/etc/ssl/cert.pem"
for x in "/etc/ssl/certs/ca-certificates.crt" "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/ca-bundle.pem" "/etc/pki/tls/cacert.pem" "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" "/etc/ssl/cert.pem" "/usr/local/share/ca-certificates/"
do
[ -f "$x" ] && sslcert="$x" && break
done || { echo "CA Certificate not found. Please install one or link it to /etc/ssl/certs/ca-certificates.crt" && exit 1 ;}
@@ -103,7 +103,7 @@ set folder = \"imaps://$fulladdr@$imap:$iport\"
set imap_user = \"$login\"
set header_cache = $cachedir/$title/headers
set message_cachedir = $cachedir/$title/bodies
set imap_pass = \`pass mutt-wizard-$title\`
set imap_pass = \"\`pass mutt-wizard-$title\`\"

set mbox_type = Maildir
set ssl_starttls = yes
@@ -190,7 +190,7 @@ EOF
}

protonfinger() { printf "Getting Protonmail bridge fingerprint...\\n"
fingerprint="$(msmtp --serverinfo --tls --tls-certcheck=off -a "$title")" || return 1
fingerprint="$(msmtp --serverinfo --host=127.0.0.1 --port=1025 --tls --tls-certcheck=off)" || return 1
sed -ibu "s/account $title/&\ntls_trust_file\ntls_fingerprint $fingerprint/" "$msmtprc" ; rm -f "$msmtprc"bu
}

@@ -289,6 +289,7 @@ asktype() { while : ; do

purge() { confirm "delete all account data" || exit
rm -rf "$mbsyncrc" "$accdir" "$HOME/.config/msmtp" "$cachedir"
crontab -l | sed '/mailsync/d' | crontab - >/dev/null
echo "All configs and account settings have been purged."
sed -ibu "/\# mw-autogenerated/d" "$muttrc" ; rm -f "$muttrc"bu
}


+ 55
- 10
share/domains.csv Просмотреть файл

@@ -19,10 +19,10 @@ archaeologist.com,imap.mail.com,993,smtp.mail.com,587
arcticmail.com,imap.mail.com,993,smtp.mail.com,587
artlover.com,imap.mail.com,993,smtp.mail.com,587
asia.com,imap.mail.com,993,smtp.mail.com,587
autograf.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
auctioneer.net,imap.mail.com,993,smtp.mail.com,587
autistiche.org,mail.autistici.org,993,smtp.autistici.org,465
autistici.org,mail.autistici.org,993,smtp.autistici.org,465
autograf.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
autoproduzioni.net,mail.autistici.org,993,smtp.autistici.org,465
bartender.net,imap.mail.com,993,smtp.mail.com,587
bastardi.net,mail.autistici.org,993,smtp.autistici.org,465
@@ -35,15 +35,16 @@ brew-meister.com,imap.mail.com,993,smtp.mail.com,587
bruttocarattere.org,mail.autistici.org,993,smtp.autistici.org,465
canaglie.net,mail.autistici.org,993,smtp.autistici.org,465
canaglie.org,mail.autistici.org,993,smtp.autistici.org,465
carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
cash4u.com,imap.mail.com,993,smtp.mail.com,587
cheerful.com,imap.mail.com,993,smtp.mail.com,587
chef.net,imap.mail.com,993,smtp.mail.com,587
chemist.com,imap.mail.com,993,smtp.mail.com,587
chrissx.ga,chrissx.ga,993,chrissx.ga,25
clarkson.edu,imap.gmail.com,993,smtp.gmail.com,587
clerk.com,imap.mail.com,993,smtp.mail.com,587
clubmember.org,imap.mail.com,993,smtp.mail.com,587
cmail.carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
carleton.ca,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
cocaine.ninja,mail.cock.li,993,mail.cock.li,587
cock.email,mail.cock.li,993,mail.cock.li,587
cock.li,mail.cock.li,993,mail.cock.li,587
@@ -74,10 +75,12 @@ eneco.com,outlook.office365.com,993,smtp.office365.com,587
engineer.com,imap.mail.com,993,smtp.mail.com,587
erciyes.edu.tr,posta.erciyes.edu.tr,993,smtp.erciyes.edu.tr,587
ethancoe.com,mail.privateemail.com,993,mail.privateemail.com,465
etu.upmc.fr,courriel.upmc.fr,993,smtps.upmc.fr,587
europe.com,imap.mail.com,993,smtp.mail.com,587
fastmail.com,imap.fastmail.com,993,smtp.fastmail.com,465
fastmail.fm,imap.fastmail.com,993,smtp.fastmail.com,465
firemail.cc,mail.cock.li,993,mail.cock.li,587
forpsi.com,imap.forpsi.com,993,smtp.forpsi.com,465
forthnet.gr,mail.forthnet.gr,993,smtp-auth.forthnet.gr,465
fsmpi.rwth-aachen.de,mail.fsmpi.rwth-aachen.de,993,mail.fsmpi.rwth-aachen.de,465
fsu-jena,exchange.uni-jena.de,993,smtp.uni-jena.de,587
@@ -87,10 +90,10 @@ gmx.at,imap.gmx.net,993,mail.gmx.net,587
gmx.com,imap.gmx.net,993,mail.gmx.net,587
gmx.de,imap.gmx.net,993,mail.gmx.net,587
gmx.eu,imap.gmx.net,993,mail.gmx.net,587
gmx.fr,imap.gmx.com,993,mail.gmx.com,587
gmx.info,imap.gmx.net,993,mail.gmx.net,587
gmx.net,imap.gmx.net,993,mail.gmx.net,587
gmx.org,imap.gmx.net,993,mail.gmx.net,587
gmx.fr,imap.gmx.com,993,mail.gmx.com,587
go2.pl,poczta.o2.pl,993,poczta.o2.pl,465
goat.si,mail.cock.li,993,mail.cock.li,587
googlemail.com,imap.googlemail.com,993,smtp.googlemail.com,587
@@ -98,11 +101,48 @@ grrlz.net,mail.autistici.org,993,smtp.autistici.org,465
hacari.com,mail.autistici.org,993,smtp.autistici.org,465
hacari.net,mail.autistici.org,993,smtp.autistici.org,465
hacari.org,mail.autistici.org,993,smtp.autistici.org,465
hhu.de,mail.hhu.de,993,mail.hhu.de,465
hitler.rocks,mail.cock.li,993,mail.cock.li,587
horsefucker.org,mail.cock.li,993,mail.cock.li,587
hostgator,gator4171.hostgator.com,993,gator4171.hostgator.com,587
hotmail.be,outlook.office365.com,993,smtp.office365.com,587
hotmail.ca,outlook.office365.com,993,smtp.office365.com,587
hotmail.cl,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.id,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.il,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.in,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.jp,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.kr,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.th,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.uk,outlook.office365.com,993,smtp.office365.com,587
hotmail.co.za,outlook.office365.com,993,smtp.office365.com,587
hotmail.com,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
hotmail.com.ar,outlook.office365.com,993,smtp.office365.com,587
hotmail.com.au,outlook.office365.com,993,smtp.office365.com,587
hotmail.com.br,outlook.office365.com,993,smtp.office365.com,587
hotmail.com.hk,outlook.office365.com,993,smtp.office365.com,587
hotmail.com.tr,outlook.office365.com,993,smtp.office365.com,587
hotmail.com.tw,outlook.office365.com,993,smtp.office365.com,587
hotmail.com.vn,outlook.office365.com,993,smtp.office365.com,587
hotmail.cz,outlook.office365.com,993,smtp.office365.com,587
hotmail.de,outlook.office365.com,993,smtp.office365.com,587
hotmail.dk,outlook.office365.com,993,smtp.office365.com,587
hotmail.es,outlook.office365.com,993,smtp.office365.com,587
hotmail.fi,outlook.office365.com,993,smtp.office365.com,587
hotmail.fr,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
hotmail.gr,outlook.office365.com,993,smtp.office365.com,587
hotmail.hu,outlook.office365.com,993,smtp.office365.com,587
hotmail.it,outlook.office365.com,993,smtp.office365.com,587
hotmail.lt,outlook.office365.com,993,smtp.office365.com,587
hotmail.lv,outlook.office365.com,993,smtp.office365.com,587
hotmail.my,outlook.office365.com,993,smtp.office365.com,587
hotmail.nl,outlook.office365.com,993,smtp.office365.com,587
hotmail.no,outlook.office365.com,993,smtp.office365.com,587
hotmail.ph,outlook.office365.com,993,smtp.office365.com,587
hotmail.rs,outlook.office365.com,993,smtp.office365.com,587
hotmail.se,outlook.office365.com,993,smtp.office365.com,587
hotmail.sg,outlook.office365.com,993,smtp.office365.com,587
hotmail.sk,outlook.office365.com,993,smtp.office365.com,587
hushmail.com,imap.hushmail.com,993,smtp.hushmail.com,465
illinois.edu, imap.gmail.com,993,smtp.gmail.com,465
iname.com,imap.mail.com,993,smtp.mail.com,587
@@ -110,10 +150,11 @@ inf.h-brs.de,imap.inf.h-brs.de,993,smtp.inf.h-brs.de,587
infomaniak.com,imap.infomaniak.com,993,imap.infomaniak.com,587
insiberia.net,mail.autistici.org,993,smtp.autistici.org,465
insicuri.net,mail.autistici.org,993,smtp.autistici.org,465
interactio.io,imap.gmail.com,993,smtp.gmail.com,587
interia.eu,poczta.interia.pl,993,poczta.interia.pl,465
interia.pl,poczta.interia.pl,993,poczta.interia.pl,465
interactio.io,imap.gmail.com,993,smtp.gmail.com,587
inventati.org,mail.autistici.org,993,smtp.autistici.org,465
itu.dk,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
kipras.org,mail.kipras.org,993,mail.kipras.org,587
krutt.org,mail.autistici.org,993,smtp.autistici.org,465
lavabit.com,lavabit.com,993,lavabit.com,587
@@ -124,6 +165,7 @@ loves.dicksinhisan.us,mail.cock.li,993,mail.cock.li,587
loves.dicksinmyan.us,mail.cock.li,993,mail.cock.li,587
lukesmith.xyz,mail.lukesmith.xyz,993,mail.lukesmith.xyz,587
mail.com,imap.mail.com,993,smtp.mail.com,587
mail.polimi.it,outlook.office365.com,993,smtp.office365.com,587
mail.ru,imap.mail.ru,993,smtp.mail.ru,465
mailbox.org,imap.mailbox.org,993,smtp.mailbox.org,587
memeware.net,mail.cock.li,993,mail.cock.li,587
@@ -139,6 +181,7 @@ nigge.rs,mail.cock.li,993,mail.cock.li,587
nuke.africa,mail.cock.li,993,mail.cock.li,587
nyu.edu,imap.gmail.com,993,smtp.gmail.com,587
o2.pl,poczta.o2.pl,993,poczta.o2.pl,465
odu.edu,imap.gmail.com,993,smtp.gmail.com,587
one.com,imap.one.com,993,send.one.com,465
onenetbeyond.org,mail.autistici.org,993,smtp.autistici.org,465
onet.com.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
@@ -148,15 +191,14 @@ online.de,imap.1und1.de,993,smtp.1und1.de,465
op.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
opoczta.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
orange.fr,imap.orange.fr,993,smtp.orange.fr,465
outlook.at,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
outlook.com,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
outlook.de,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
outlook.at,imap-mail.outlook.com,993,smtp-mail.outlook.com,587
paranoici.org,mail.autistici.org,993,smtp.autistici.org,465
pm.me,127.0.0.1,1143,127.0.0.1,1025
poczta.fm,poczta.interia.pl,993,poczta.interia.pl,465
poczta.onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
polimi.it,outlook.office365.com,993,smtp.office365.com,587
mail.polimi.it,outlook.office365.com,993,smtp.office365.com,587
post.com,imap.mail.com,993,smtp.mail.com,587
posteo.de,posteo.de,993,posteo.de,587
posteo.net,posteo.de,993,posteo.de,587
@@ -172,6 +214,7 @@ sapo.pt,imap.sapo.pt,993,smtp.sapo.pt,587
smail.inf.h-brs.de,imap.inf.h-brs.de,993,smtp.inf.h-brs.de,587
southwales.ac.uk,imap.gmail.com,993,smtp.gmail.com,587
spoko.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
stevens.edu,imap-mail.outlook.com,993,smpt-mail.outlook.com,587
stronzi.org,mail.autistici.org,993,smtp.autistici.org,465
stud.tu-darmstadt.de,imap.stud.tu-darmstadt.de,993,smtp.tu-darmstadt.de,465
stud.uis.no,outlook.office365.com,993,smtp.office365.com,587
@@ -185,13 +228,17 @@ teknik.io,mail.teknik.io,993,mail.teknik.io,587
telenet.be,imap.telenet.be,993,smtp.telenet.be,587
tfwno.gf,mail.cock.li,993,mail.cock.li,587
tlen.pl,poczta.o2.pl,993,poczta.o2.pl,465
tquad.ai,imap.mail.eu-west-1.awsapps.com,993,smtp.mail.eu-west-1.awsapps.com,465
tu-harburg.de,mail.tu-harburg.de,993,mail.tu-harburg.de,587
tuhh.de,mail.tu-harburg.de,993,mail.tu-harburg.de,587
txstate.edu,outlook.office365.com,993,smtp.office365.com,587
uach.mx,imap.gmail.com,993,smtp.gmail.com,587
uni-duesseldorf.de,mail.hhu.de,993,mail.hhu.de,465
uoregon.edu,imap.uoregon.edu,993,smtp.uoregon.edu,587
uqtr.ca,outlook.office365.com,993,smtp.office365.com,587
usa.com,imap.mail.com,993,smtp.mail.com,587
utas.edu.au,outlook.office365.com,993,smtp.office365.com,587
utdallas.edu,outlook.office365.com,993,smtp.office365.com,587
uw.edu,imap.gmail.com,993,smtp.gmail.com,465
uymail.com,imap.mail.com,993,smtp.mail.com,587
vip.onet.pl,imap.poczta.onet.pl,993,smtp.poczta.onet.pl,465
@@ -206,8 +253,9 @@ web.de,imap.web.de,993,smtp.web.de,587
wp.pl,imap.wp.pl,993,smtp.wp.pl,465
writeme.com,imap.mail.com,993,smtp.mail.com,587
ya.ru,imap.yandex.com,993,smtp.yandex.com,587
yahoo.fr,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,587
yahoo.com,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,587
yahoo.fr,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,587
yahoo.gr,imap.mail.yahoo.com,993,smtp.mail.yahoo.com,587
yandex.by,imap.yandex.com,993,smtp.yandex.com,587
yandex.com,imap.yandex.com,993,smtp.yandex.com,587
yandex.kz,imap.yandex.com,993,smtp.yandex.com,587
@@ -215,6 +263,3 @@ yandex.net,imap.yandex.com,993,smtp.yandex.com,587
yandex.ru,imap.yandex.com,993,smtp.yandex.com,587
yandex.ua,imap.yandex.com,993,smtp.yandex.com,587
zoho.com,imap.zoho.com,993,smtp.zoho.com,465
clarkson.edu,imap.gmail.com,993,smtp.gmail.com,587
odu.edu,imap.gmail.com,993,smtp.gmail.com,587
utdallas.edu,outlook.office365.com,993,smtp.office365.com,587

+ 1
- 1
share/mailcap Просмотреть файл

@@ -1,5 +1,5 @@
text/plain; $EDITOR %s ;
text/html; openfile %s ;
text/html; openfile %s ; nametemplate=%s.html
text/html; w3m -I %{charset} -T text/html; copiousoutput;
image/*; muttimage %s ; copiousoutput
video/*; setsid mpv --quiet %s &; copiousoutput


+ 3
- 2
share/mutt-wizard.muttrc Просмотреть файл

@@ -4,7 +4,6 @@
# In the interest of seamless updating, do not edit this file.
# If you want to override any settings, set those in your muttrc.
set mailcap_path = /usr/local/share/mutt-wizard/mailcap
set certificate_file = ~/.cache/mutt-wizard/certificates
set date_format="%y/%m/%d %I:%M%p"
set index_format="%2C %zs %?X?A& ? %D %-15.15F %s (%-4.4c)"
set sort = 'reverse-date'
@@ -45,7 +44,9 @@ bind index U undelete-message
bind index L limit
bind index h noop
bind index l display-message
bind browser h goto-parent
#bind browser h goto-parent
macro browser h '<change-dir><kill-line>..<enter>' "Go to parent folder"
bind index,pager H view-raw-message
bind browser l select-entry
bind pager,browser gg top-page
bind pager,browser G bottom-page


Загрузка…
Отмена
Сохранить