Merge pull request #123 from krimha/bugfix-msmtprc

Implement deletion of accounts from .msmtprc
This commit is contained in:
Luke Smith 2019-02-16 13:14:02 -05:00 committed by GitHub
commit 76cd73a11e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,9 @@ removeAccount() { sed -ie "
rm "$muttdir"/accounts/$1.muttrc rm "$muttdir"/accounts/$1.muttrc
rm "$muttdir"/credentials/$1.gpg rm "$muttdir"/credentials/$1.gpg
rm -rf "$muttdir"/accounts/$1 rm -rf "$muttdir"/accounts/$1
sed -i "/$1.muttrc/d" "$muttdir"/personal.muttrc ;} sed -i "/$1.muttrc/d" "$muttdir"/personal.muttrc
# Delete from the line matching the account name, until the next account or empty line
sed -i "/account $1/,/^\(\s*$\|account\)/d" ~/.msmtprc ;}
manual() { \ manual() { \
imap=$( dialog --inputbox "Insert the IMAP server for your email provider (excluding the port number)" 10 60 3>&1 1>&2 2>&3 3>&- ) imap=$( dialog --inputbox "Insert the IMAP server for your email provider (excluding the port number)" 10 60 3>&1 1>&2 2>&3 3>&- )