summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2021-08-14 18:50:33 -0400
committerLuke Smith <luke@lukesmith.xyz>2021-08-14 18:50:33 -0400
commitfb68f19846141df5ff5c6b8c4f15f589b0f5000f (patch)
tree56d74a17e2eef488344269e8d0adff3e451480f7 /bin
parentd2942f2d22f4090fa3abc8d1f8eb2377fac0a7ba (diff)
use soyterms if not slower distro
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mw19
1 files changed, 14 insertions, 5 deletions
diff --git a/bin/mw b/bin/mw
index 41977b1..87ec79c 100755
--- a/bin/mw
+++ b/bin/mw
@@ -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 *