File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ getboxes() {
221221 if [ -n " ${force+x} " ]; then
222222 mailboxes=" $( printf " INBOX\\ nDrafts\\ nJunk\\ nTrash\\ nSent\\ nArchive" ) "
223223 else
224- info=" $( curl --location-trusted -s -m 5 --user " $login :$( pass " $passprefix$fulladdr " ) " --url " ${protocol:- imaps} ://$imap :${iport:- 993} " ) "
224+ info=" $( curl --proxy " $proxy " -- location-trusted -s -m 5 --user " $login :$( pass " $passprefix$fulladdr " ) " --url " ${protocol:- imaps} ://$imap :${iport:- 993} " ) "
225225 [ -z " $info " ] && errorexit
226226 mailboxes=" $( echo " $info " | grep -v HasChildren | sed " s/.*\" //;s/\" //g" | tr -d ' \r' ) "
227227 fi
@@ -301,6 +301,7 @@ Options allowed with -a:
301301 -X Delete an account's local email too when deleting.
302302 -o Configure address, but keep mail online.
303303 -f Assume typical English mailboxes without attempting log-on.
304+ -R Use a proxy server for curl (useful for bypassing network restrictions)
304305
305306NOTE: Once at least one account is added, you can run
306307\` mbsync -a\` to begin downloading mail.
@@ -333,9 +334,10 @@ reorder() {
333334 ' " $tempfile " >> " $muttrc "
334335}
335336
336- while getopts " rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:" o; do case " ${o} " in
337+ while getopts " rfpXlhodTYD:y:i:I:s:S:u:a:n:P:x:m:t:R: " o; do case " ${o} " in
337338 l) setact list ;;
338339 r) setact reorder ;;
340+ R) proxy=" $OPTARG " ;;
339341 d) setact delete ;;
340342 D)
341343 setact delete
Original file line number Diff line number Diff line change @@ -73,6 +73,9 @@ Account password. You will be prompted for the password interactively if this op
7373.TP
7474.B -P
7575Pass Prefix. The password will be stored using pass at <passprefix><email>
76+ .TP
77+ .B -R
78+ Use a proxy server for curl (useful for bypassing network restrictions)
7679.SH OTHER OPTIONS
7780.TP
7881.B -f
You can’t perform that action at this time.
0 commit comments