Bläddra i källkod

deprecate -y and -Y, cleanup.

pull/908/head
Luke Smith 1 år sedan
förälder
incheckning
234be769e8
Ingen känd nyckel hittad för denna signaturen i databasen GPG-nyckel ID: 4C50B54A911F6252
2 ändrade filer med 13 tillägg och 11 borttagningar
  1. +3
    -2
      README.md
  2. +10
    -9
      bin/mw

+ 3
- 2
README.md Visa fil

@@ -35,6 +35,7 @@ Specifically, this wizard:
- `isync` - downloads and syncs the mail (required if storing IMAP mail locally).
- `msmtp` - sends the email.
- `pass` - safely encrypts passwords (required at install).
- `ca-certificates` - required for SSL. Probably installed already.

**Note**: There's a chance of errors if you use a slow-release distro like
Ubuntu, Debian, or Mint. If you get errors in `neomutt`, install the most
@@ -75,14 +76,14 @@ The mutt-wizard runs via the command `mw`. Once setup is complete, you'll use

- `mw -a you@email.com` -- add a new email account
- `mw -l` -- list existing accounts
- `mw -y your@email.com` -- sync an email account
- `mw -Y` -- sync all configured email accounts
- `mw -d` -- choose an account to delete
- `mw -D your@email.com` -- delete account settings without confirmation
- `mw -t 30` -- toggle automatic mailsync to every 30 minutes
- `mw -T` -- toggle mailsync without specifying minutes (default is 10)
- `mw -r` -- reorder account shortcut numbers
- `pass edit mw-your@email.com` -- revise an account's password
- `mailsync` -- sync all configured email accounts. Also gives notifications of new mail and indexes new mail with notmuch silently.
- `mailsync your@email.com` -- sync a particular (or several) email account(s).

### Options usable when adding an account



+ 10
- 9
bin/mw Visa fil

@@ -12,7 +12,8 @@ mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}"
mpoprc="${XDG_CONFIG_HOME:-$HOME/.config}/mpop/config"
alias mbsync='mbsync -c "$mbsyncrc"'

# On Ubuntu/Debian, a link is needed since they use an older version.
# mbsync now requires "Far/Near" rather than "Master/Slave", but Ubuntu/Debian
# have the older version.
if command -V apt-get >/dev/null 2>&1; then
master="Master"
slave="Slave"
@@ -98,7 +99,7 @@ set realname = \"$realname\"
set from = \"$fulladdr\"
set sendmail = \"msmtp -a $fulladdr\"
alias me $realname <$fulladdr>
set folder = \"$folder\"
set folder = \"${folder:-$maildir/$fulladdr}\"
set header_cache = $cachedir/$fulladdr/headers
set message_cachedir = $cachedir/$fulladdr/bodies
set mbox_type = Maildir
@@ -110,6 +111,7 @@ set trash = "+Trash"
set record = "+Sent"
$extra
$synccmd
macro index o \"<shell-escape>mailsync $fulladdr<enter>\" \"sync $fulladdr\"
macro index \eg \"<enter-command>unset wait_key<enter><shell-escape>gpg --list-secret-keys; printf 'Enter email ID of user to publish: '; read eID; printf 'Enter fingerprint of GPG key to publish: '; read eFGPT; $prefix/libexec/gpg-wks-client --create \\\$eFGPT \\\$eID | msmtp --read-envelope-from --read-recipients -a $fulladdr<enter>\" \"publish GPG key to WKS provider\"
macro index \eh \"<pipe-message>$prefix/libexec/gpg-wks-client --receive | msmtp --read-envelope-from --read-recipients -a $fulladdr<enter>\" \"confirm GPG publication\"
" > "$accdir/$fulladdr.muttrc"
@@ -132,12 +134,8 @@ set imap_pass = \"\`pass $passprefix$fulladdr\`\"
set ssl_starttls = yes
set ssl_force_tls = yes"
;;
pop) synccmd="macro index o \"<shell-escape>mpop $fulladdr<enter>\" \"run mpop to get $fulladdr's mail\""
folder="$maildir/$fulladdr"
prepmpop ;;
*) synccmd="macro index o \"<shell-escape>mw -y $fulladdr<enter>\" \"run mbsync to sync $fulladdr\""
folder="$maildir/$fulladdr"
prepmbsync ;;
pop) prepmpop ;;
*) prepmbsync ;;
esac
prepmsmtp
prepmutt
@@ -379,7 +377,10 @@ case "$action" in
list) list ;;
add) checkbasics && askinfo && getboxes && getprofiles && finalize ;;
delete) delete ;;
sync) mailsync $fulladdr ;;
sync)
echo "\`mw -y\` and \`mw -Y\` are now deprecated and will be removed in a future update. Please switch to using \`mailsync\`."
mailsync $fulladdr
;;
toggle) togglecron ;;
reorder) reorder ;;
*) mwinfo; exit 1 ;;


Laddar…
Avbryt
Spara