Quellcode durchsuchen

Added --proxy to curl and updated the help info and the man page to display the practical use

of proxy
pull/1035/head
mojtabavahidinasab vor 1 Monat
Ursprung
Commit
ade5d0cd7f
2 geänderte Dateien mit 7 neuen und 2 gelöschten Zeilen
  1. +4
    -2
      bin/mw
  2. +3
    -0
      mw.1

+ 4
- 2
bin/mw Datei anzeigen

@@ -221,7 +221,7 @@ getboxes() {
if [ -n "${force+x}" ]; then
mailboxes="$(printf "INBOX\\nDrafts\\nJunk\\nTrash\\nSent\\nArchive")"
else
info="$(curl --location-trusted -s -m 5 --user "$login:$(pass "$passprefix$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")"
info="$(curl --proxy "$proxy" --location-trusted -s -m 5 --user "$login:$(pass "$passprefix$fulladdr")" --url "${protocol:-imaps}://$imap:${iport:-993}")"
[ -z "$info" ] && errorexit
mailboxes="$(echo "$info" | grep -v HasChildren | sed "s/.*\" //;s/\"//g" | tr -d '\r')"
fi
@@ -301,6 +301,7 @@ Options allowed with -a:
-X Delete an account's local email too when deleting.
-o Configure address, but keep mail online.
-f Assume typical English mailboxes without attempting log-on.
-R Use a proxy server for curl (useful for bypassing network restrictions)

NOTE: Once at least one account is added, you can run
\`mbsync -a\` to begin downloading mail.
@@ -333,9 +334,10 @@ reorder() {
' "$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:R:" o; do case "${o}" in
l) setact list ;;
r) setact reorder ;;
R) proxy="$OPTARG" ;;
d) setact delete ;;
D)
setact delete


+ 3
- 0
mw.1 Datei anzeigen

@@ -73,6 +73,9 @@ Account password. You will be prompted for the password interactively if this op
.TP
.B -P
Pass Prefix. The password will be stored using pass at <passprefix><email>
.TP
.B -R
Use a proxy server for curl (useful for bypassing network restrictions)
.SH OTHER OPTIONS
.TP
.B -f


Laden…
Abbrechen
Speichern