diff options
-rwxr-xr-x | bin/mw | 24 | ||||
-rw-r--r-- | share/domains.csv | 7 |
2 files changed, 23 insertions, 8 deletions
@@ -12,7 +12,18 @@ mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}" mpoprc="${XDG_CONFIG_HOME:-$HOME/.config}/mpop/config" alias mbsync='mbsync -c "$mbsyncrc"' -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 +# On Ubuntu/Debian, a link is needed since they use an older version. +if command -V apt-get >/dev/null 2>&1; then + ln -s "$msmtprc" "$HOME/.msmtprc" 2>/dev/null + master="Master" + slave="Slave" +fi + +for x in "/etc/ssl/certs/ca-certificates.crt" \ + "/etc/pki/tls/certs/ca-bundle.crt" "/etc/ssl/cert.pem" \ + "/etc/ssl/ca-bundle.pem" "/etc/pki/tls/cacert.pem" \ + "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.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 ;} @@ -39,8 +50,6 @@ ${tlsline:-tls on} tls_trust_file $sslcert logfile $msmtplog " >> "$msmtprc" - # On Ubuntu/Debian, a link is needed since they use an older version. - command -V apt-get >/dev/null 2>&1 && ln -s "$msmtprc" "$HOME/.msmtprc" 2>/dev/null } prepmbsync() { mkdir -p "${mbsyncrc%/*}" @@ -61,8 +70,8 @@ Inbox ${XDG_DATA_HOME:-$HOME/.local/share}/mail/$fulladdr/${inbox:-INBOX} Channel $fulladdr Expunge Both -Master :$fulladdr-remote: -Slave :$fulladdr-local: +${master:-Far} :$fulladdr-remote: +${slave:-Near} :$fulladdr-local: Patterns * !\"[Gmail]/All Mail\" Create Both SyncState * @@ -182,7 +191,7 @@ askinfo() { \ [ -z "$fulladdr" ] && echo "Give the full email address to add:" && read -r fulladdr while ! echo "$fulladdr" | grep -qE "^.+@.+\.[A-Za-z]+$"; do - echo "\`$fulladdr\` is not a valid email address. Please retype the address:" + echo "$fulladdr is not a valid email address. Please retype the address:" read -r fulladdr done getaccounts; echo "$accounts" | grep -q "\s$fulladdr$" 2>/dev/null && @@ -228,6 +237,8 @@ getboxes() { if [ -n "${force+x}" ] ; then [ "$type" = "pop" ] && mailboxes="INBOX" getaccounts; for x in $(seq 1 9); do echo "$accounts" | grep -q "^$x:" || { export idnum="$x"; break ;}; done toappend="mailboxes $(echo "$mailboxes" | sed "s/^/\"=/;s/$/\"/" | paste -sd ' ' - )" + IFS=' +' for x in $mailboxes; do case "$x" in *[Ss][Ee][Nn][Tt]*) setBox record "$x"; formatShortcut s sent "$x" ;; @@ -239,6 +250,7 @@ getboxes() { if [ -n "${force+x}" ] ; then *[Ii][Nn][Bb][Oo][Xx]) formatShortcut i inbox "$x"; setBox spoolfile "$x" inbox="$x" ;; esac done + unset IFS } finalize() { echo "$toappend" >> "$accdir/$idnum-$fulladdr.muttrc" diff --git a/share/domains.csv b/share/domains.csv index f0d8399..292e05c 100644 --- a/share/domains.csv +++ b/share/domains.csv @@ -1,6 +1,8 @@ ADDRESS,IMAP,imap port,SMTP,smtp port +gordon.edu,outlook.office365.com,993,smtp.office365.com,587 126.com,imap.126.com,993,smtp.126.com,587 163.com,imap.163.com,993,smtp.163.com,587 +3nt3.de,mail.3nt3.de,993,mail.3nt3.de,465 420blaze.it,mail.cock.li,993,mail.cock.li,587 8chan.co,mail.cock.li,993,mail.cock.li,587 aaathats3as.com,mail.cock.li,993,mail.cock.li,587 @@ -158,6 +160,7 @@ loves.dicksinmyan.us,mail.cock.li,993,mail.cock.li,587 lukesmith.xyz,mail.lukesmith.xyz,993,mail.lukesmith.xyz,587 luther.edu,imap.gmail.com,993,smtp.gmail.com,587 mac.com,imap.mail.me.com,993,smtp.mail.me.com,587 +mace.ac.in,imap.gmail.com,993,smtp.gmail.com,587 mail.com,imap.mail.com,993,smtp.mail.com,587 mail.de,imap.mail.de,993,smtp.mail.de,465 mail.mcgill.ca,outlook.office365.com,993,smtp.office365.com,587 @@ -205,8 +208,8 @@ outlook.*,imap-mail.outlook.com,993,smtp-mail.outlook.com,587 outlook.es,outlook.office365.com,993,smtp.office365.com,587 parabolas.xyz,mail.parabolas.xyz,993,mail.parabolas.xyz,587 paranoici.org,mail.autistici.org,993,smtp.autistici.org,465 -paranoid.network,imap.nixnet.email,143,smtp.nixnet.email,587 paranoid.email,imap.paranoid.email,993,smtp.paranoid.email,25 +paranoid.network,imap.nixnet.email,143,smtp.nixnet.email,587 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 @@ -280,9 +283,9 @@ uach.mx,imap.gmail.com,993,smtp.gmail.com,587 ucdavis.edu,imap.gmail.com,993,smtp.gmail.com,587 ucsb.edu,imap.gmail.com,993,smtp.gmail.com,587 ucsc.edu,imap.gmail.com,993,smtp.gmail.com,587 -uni.strath.ac.uk,outlook.office365.com,993,smtp.office365.com,587 uni-duesseldorf.de,mail.hhu.de,993,mail.hhu.de,465 uni-jena.de,imap.uni-jena.de,993,smtp.uni-jena.de,587 +uni.strath.ac.uk,outlook.office365.com,993,smtp.office365.com,587 unilodz.eu,outlook.office365.com,993,smtp.office365.com,587 unitn.it,imap.gmail.com,993,smtp.gmail.com,587 unitybox.de,mail.unity-mail.de,993,mail.unity-mail.de,587 |