etc
This commit is contained in:
parent
b8694f03d3
commit
23e7829195
16
README.md
16
README.md
@ -16,12 +16,20 @@ Clone the repo to `~/.config/mutt`. Either move to backup or delete your old `~/
|
|||||||
|
|
||||||
Be sure to install the following programs:
|
Be sure to install the following programs:
|
||||||
|
|
||||||
- `neomutt` - the email client.
|
- `neomutt` - the email client. If you delete a lot of the neomutt-specific settings in the muttrc, you can run vanilla mutt if you want.
|
||||||
- `offlineimap` - downloads the email.
|
- `offlineimap` - downloads the email. Required for installation.
|
||||||
- `msmtp` - sends your email.
|
- `msmtp` - sends your email.
|
||||||
- `dialog` - is the mutt-wizard interface.
|
- `dialog` - is the mutt-wizard interface. Required for installation.
|
||||||
|
|
||||||
**You must have a GPG public/private key pair as well.** This is what will safely encrypt your passwords.
|
**You must have a GPG public/private key pair as well.** This is what will safely encrypt your passwords. Run `gpg --full-gen-key` (or `gpg2 --full-gen-key`) to get one.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
|
||||||
|
Once the repository is in place in `~/.config/mutt/`:
|
||||||
|
|
||||||
|
- Select to add an account. This will autogenerate your config files for mutt, offlineimap and msmtp.
|
||||||
|
- Run `offlineimap` once (at least a partial sync). This will create all the directories you need to finalize installation and will start downloading your mail.
|
||||||
|
- Select the option to autodetect mailboxes. This will use the directories offlineimap creates to detect your mailboxes and make your mail readable by mutt.
|
||||||
|
|
||||||
### Optional dependencies
|
### Optional dependencies
|
||||||
|
|
||||||
|
21
mw
21
mw
@ -150,22 +150,12 @@ EOF
|
|||||||
done
|
done
|
||||||
login=$(dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "If you have a username for the \"$title\" account which is different from your email address, enter it here. Otherwise leave this prompt blank." 10 60 3>&1 1>&2 2>&3 3>&- ) || userexit
|
login=$(dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "If you have a username for the \"$title\" account which is different from your email address, enter it here. Otherwise leave this prompt blank." 10 60 3>&1 1>&2 2>&3 3>&- ) || userexit
|
||||||
[ -z "$login" ] && login="$fulladdr"
|
[ -z "$login" ] && login="$fulladdr"
|
||||||
#ifgoogleline
|
# service
|
||||||
|
# ifgoogleline
|
||||||
grep "i[0-9]" "$muttdir/personal.muttrc" | awk '{print $3}' | sed -e 's/i//g' > "$tmpdir/mutt_used"
|
grep "i[0-9]" "$muttdir/personal.muttrc" | awk '{print $3}' | sed -e 's/i//g' > "$tmpdir/mutt_used"
|
||||||
printf "1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9" > "$tmpdir/mutt_all_possible"
|
printf "1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9" > "$tmpdir/mutt_all_possible"
|
||||||
idnum=$(diff "$tmpdir/mutt_all_possible" "$tmpdir/mutt_used" | sed -n 2p | awk '{print $2}')
|
idnum=$(diff "$tmpdir/mutt_all_possible" "$tmpdir/mutt_used" | sed -n 2p | awk '{print $2}')
|
||||||
getpass "$title" || userexit
|
getpass "$title" || userexit
|
||||||
addaccount
|
|
||||||
}
|
|
||||||
|
|
||||||
getpass() { \
|
|
||||||
dialog --title "Luke's mutt/offlineIMAP password wizard" --passwordbox "Enter the password for the \"$1\" account." 10 60 2> "$tmpdir/$1"
|
|
||||||
"$GPG" -r "$gpgemail" --encrypt "$tmpdir/$1"
|
|
||||||
shred -u "$tmpdir/$1"
|
|
||||||
mv "$tmpdir/$1.gpg" "$creddir"
|
|
||||||
}
|
|
||||||
|
|
||||||
addaccount() { \
|
|
||||||
getprofiles
|
getprofiles
|
||||||
mkdir -p "$HOME/.config/offlineimap/" "$HOME/.config/msmtp"
|
mkdir -p "$HOME/.config/offlineimap/" "$HOME/.config/msmtp"
|
||||||
[ ! -f "$HOME/.config/offlineimap/config" ] && echo "$offlineimap_header" > "$HOME/.config/offlineimap/config"
|
[ ! -f "$HOME/.config/offlineimap/config" ] && echo "$offlineimap_header" > "$HOME/.config/offlineimap/config"
|
||||||
@ -175,6 +165,13 @@ addaccount() { \
|
|||||||
echo "$mutt_profile" > "$accdir/$title.muttrc"
|
echo "$mutt_profile" > "$accdir/$title.muttrc"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getpass() { \
|
||||||
|
dialog --title "Luke's mutt/offlineIMAP password wizard" --passwordbox "Enter the password for the \"$1\" account." 10 60 2> "$tmpdir/$1"
|
||||||
|
"$GPG" -r "$gpgemail" --encrypt "$tmpdir/$1"
|
||||||
|
shred -u "$tmpdir/$1"
|
||||||
|
mv "$tmpdir/$1.gpg" "$creddir"
|
||||||
|
}
|
||||||
|
|
||||||
askgpg() { \
|
askgpg() { \
|
||||||
gpgemail=$(dialog --title "Luke's mutt/offlineIMAP wizard" --inputbox "To safely encrypt passwords, mutt-wizard requires that you have a GPG public/private key pair.\n\nPlease insert the email address for your key pair here, or generate one first with \`$GPG --full-gen-key\` and come back." 12 60 3>&1 1>&2 2>&3 3>&- ) || userexit
|
gpgemail=$(dialog --title "Luke's mutt/offlineIMAP wizard" --inputbox "To safely encrypt passwords, mutt-wizard requires that you have a GPG public/private key pair.\n\nPlease insert the email address for your key pair here, or generate one first with \`$GPG --full-gen-key\` and come back." 12 60 3>&1 1>&2 2>&3 3>&- ) || userexit
|
||||||
while ! echo "$gpgemail" | grep "$emailre"; do
|
while ! echo "$gpgemail" | grep "$emailre"; do
|
||||||
|
Loading…
Reference in New Issue
Block a user