|
@@ -208,7 +208,9 @@ getboxes() { |
|
|
if [ -n "${force+x}" ]; then |
|
|
if [ -n "${force+x}" ]; then |
|
|
mailboxes="$(printf "INBOX\\nDrafts\\nJunk\\nTrash\\nSent\\nArchive")" |
|
|
mailboxes="$(printf "INBOX\\nDrafts\\nJunk\\nTrash\\nSent\\nArchive")" |
|
|
else |
|
|
else |
|
|
info="$(curl --location-trusted -s -m 5 --user "$login:$(pass "$passprefix$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")" |
|
|
|
|
|
|
|
|
[ -n "$sslcert" ] \ |
|
|
|
|
|
&& info="$(curl --location-trusted -s -m 5 --user "$login:$(pass "$passprefix$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")" \ |
|
|
|
|
|
|| info="$(curl -k --location-trusted -s -m 5 --user "$login:$(pass "$passprefix$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")" |
|
|
[ -z "$info" ] && errorexit |
|
|
[ -z "$info" ] && errorexit |
|
|
mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')" |
|
|
mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')" |
|
|
fi |
|
|
fi |
|
@@ -288,6 +290,7 @@ Options allowed with -a: |
|
|
-X Delete an account's local email too when deleting. |
|
|
-X Delete an account's local email too when deleting. |
|
|
-o Configure address, but keep mail online. |
|
|
-o Configure address, but keep mail online. |
|
|
-f Assume typical English mailboxes without attempting log-on. |
|
|
-f Assume typical English mailboxes without attempting log-on. |
|
|
|
|
|
-c Path to self-signed TLS certificate. |
|
|
|
|
|
|
|
|
NOTE: Once at least one account is added, you can run |
|
|
NOTE: Once at least one account is added, you can run |
|
|
\`mbsync -a\` to begin downloading mail. |
|
|
\`mbsync -a\` to begin downloading mail. |
|
@@ -320,7 +323,7 @@ reorder() { |
|
|
' "$tempfile" >>"$muttrc" |
|
|
' "$tempfile" >>"$muttrc" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:" o; do case "${o}" in |
|
|
|
|
|
|
|
|
while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:c:" o; do case "${o}" in |
|
|
l) setact list ;; |
|
|
l) setact list ;; |
|
|
r) setact reorder ;; |
|
|
r) setact reorder ;; |
|
|
d) setact delete ;; |
|
|
d) setact delete ;; |
|
@@ -387,6 +390,10 @@ while getopts "rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:" o; do case "${o}" in |
|
|
setact add |
|
|
setact add |
|
|
password="$OPTARG" |
|
|
password="$OPTARG" |
|
|
;; |
|
|
;; |
|
|
|
|
|
c) |
|
|
|
|
|
setact add |
|
|
|
|
|
sslcert="$OPTARG" |
|
|
|
|
|
;; |
|
|
X) |
|
|
X) |
|
|
setact delete |
|
|
setact delete |
|
|
purge=True |
|
|
purge=True |
|
|