瀏覽代碼

mailbox check after password change

tags/v3.1
Luke Smith 6 年之前
父節點
當前提交
9e5c382d2d
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. +7
    -1
      mutt-wizard.sh

+ 7
- 1
mutt-wizard.sh 查看文件

@@ -29,7 +29,13 @@ changePassword() { \
dialog --title "Luke's mutt/offlineIMAP password wizard" --passwordbox "Enter the new password for the \"$1\" account." 10 60 2> /tmp/$1
gpg2 -r $gpgemail --encrypt /tmp/$1 || (dialog --title "GPG decryption failed." --msgbox "GPG decryption failed. This is either because you do not have a GPG key pair or because your distro uses GPG1 and you thus need to symlink /usr/bin/gpg2 to /usr/bin/gpg." 7 60 && break)
shred -u /tmp/$1
mv /tmp/$1.gpg ~/.config/mutt/credentials/ ;}
mv /tmp/$1.gpg ~/.config/mutt/credentials/
dialog --title "Finalizing your account." --infobox "The account \"$title\"'s password has been changed. Now attempting to configure mail directories...

This may take several seconds..." 10 70
createMailboxes $title || (clear && exit)
detectMailboxes $title
dialog --title "Password changed." --msgbox "Your "$fulladdr" password has been changed. To start the download of your mail, you can manually run \`offlineimap -a $title\` in a terminal. The first sync may take some time depending on the amount of your mail." 8 60 ;}

chooseDetect() { for x in $(cat ~/.offlineimaprc | grep "^accounts =" | sed -e 's/accounts =\( \)//g;s/\(,\) /\n/g;'); do detectMailboxes $x; done && detectSuccess ;}



Loading…
取消
儲存