summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md13
-rw-r--r--autoconf/domains.csv4
-rwxr-xr-xmutt-wizard.sh20
3 files changed, 26 insertions, 11 deletions
diff --git a/README.md b/README.md
index 3d268c0..8abc1b0 100644
--- a/README.md
+++ b/README.md
@@ -26,12 +26,14 @@ Note also that Gmail and some providers require you to enable sign-ins from thir
## Installation and Dependencies
-dialog, neomutt and offlineimap should be installed. You also need to have a GPG public/private key pair for the wizard to automatically store your passwords. Otherwise you'll have to store them insecurely in plaintext files without the help of the wizard. The whole repo should be cloned to `~/.config/mutt/`. (If you have a previous mutt folder, you'll want to back it up or delete it first.)
+`dialog`, `neomutt` and `offlineimap` should be installed. You also need to have a GPG public/private key pair for the wizard to automatically store your passwords. The whole repo should be cloned to `~/.config/mutt/`. (If you have a previous mutt folder, you'll want to back it up or delete it first.)
```
git clone https://github.com/LukeSmithxyz/mutt-wizard.git ~/.config/mutt
```
+You will want to delete or rename your current `~/.offlineimaprc` as well, as although you can later modify the `~/.offlineimaprc` produced by the script, you must have no file there the first time you add your first account or the wizard will assume some settings are already set which aren't.
+
Just run `mutt-wizard.sh` for all the options, to install an account:
* First, select the "Add an account" option and give the script your account information.
@@ -40,6 +42,15 @@ Just run `mutt-wizard.sh` for all the options, to install an account:
Whenever you want to check for mail, just run the `offlineimap` command again.
+### Non-essential dependencies
+
+The automatically deployed configs will look for certain programs for certain extra abilities. Consider installing the following for the extra functionality.
+
++ `urlview` -- Detecting and following links with `ctrl-u`
++ `mupdf` -- for viewing attached pdfs (`v` to view attachments, then select .pdf)
++ `notmuch` -- for mail searching and indexing set to `ctrl-f`. Be sure to run `notmuch setup`. Remember your mail is in `~/.mail/` when you configure notmuch.
++ `w3m` and/or `w3mimg` -- for viewing images. Like .pdfs, view in the attachments menu.
+
### "Wait? The script asks for my passwords?"
Look at the code. The script takes the passwords you give it, encrypts them immediately with your own GPG key, and shreds the leftovers. Nothing malicious; it's all there! If it makes you comfortable you can even run the script offline at first.
diff --git a/autoconf/domains.csv b/autoconf/domains.csv
index 9555c81..22a5eaf 100644
--- a/autoconf/domains.csv
+++ b/autoconf/domains.csv
@@ -20,9 +20,11 @@ asia.com,imap.mail.com,995,smtp.mail.com,587
asia.com,imap.mail.com,995,smtp.mail.com,587
auctioneer.net,imap.mail.com,995,smtp.mail.com,587
bartender.net,imap.mail.com,995,smtp.mail.com,587
+bguth.de,wp300.webpack.hosteurope.de,993,wp300.webpack.hosteurope.de,587
bikerider.com,imap.mail.com,995,smtp.mail.com,587
billycarlyle.uk,mail.muny.us,993,mail.muny.us,465
birdlover.com,imap.mail.com,995,smtp.mail.com,587
+bjoernguthphotography.de,wp300.webpack.hosteurope.de,993,wp300.webpack.hosteurope.de,587
brew-meister.com,imap.mail.com,995,smtp.mail.com,587
cash4u.com,imap.mail.com,995,smtp.mail.com,587
cheerful.com,imap.mail.com,995,smtp.mail.com,587
@@ -57,6 +59,7 @@ engineer.com,imap.mail.com,995,smtp.mail.com,587
europe.com,imap.mail.com,995,smtp.mail.com,587
fastmail.com,imap.fastmail.com,993,smtp.fastmail.com,465
firemail.cc,mail.cock.li,993,mail.cock.li,587
+fsmpi.rwth-aachen.de,mail.fsmpi.rwth-aachen.de,993,mail.fsmpi.rwth-aachen.de,465
getbackinthe.kitchen,mail.cock.li,993,mail.cock.li,587
gmail.com,imap.google.com,993,smtp.gmail.com,587
gmx.com,imap.gmx.net,993,mail.gmx.net,587
@@ -93,6 +96,7 @@ posteo.de,posteo.de,993,posteo.de,587
rape.lol,mail.cock.li,993,mail.cock.li,587
redchan.it,mail.cock.li,993,mail.cock.li,587
runbox.com,mail.runbox.com,993,mail.runbox.com,587
+rwth-aachen.de,mail.rwth-aachen.de,993,mail.rwth-aachen.de,587
sapo.pt,imap.sapo.pt,993,smtp.sapo.pt,587
techie.com,imap.mail.com,995,smtp.mail.com,587
teknik.io,mail.teknik.io,993,mail.teknik.io,587
diff --git a/mutt-wizard.sh b/mutt-wizard.sh
index 1625267..d5092ee 100755
--- a/mutt-wizard.sh
+++ b/mutt-wizard.sh
@@ -43,14 +43,14 @@ detectMailboxes() { \
echo mailboxes $oneline >> "$muttdir"accounts/$1.muttrc
sed -i "/^macro index,pager g/d" "$muttdir"accounts/$1.muttrc
grep -vi /tmp/$1_boxes -e "trash\|drafts\|sent\|trash\|spam\|junk\|archive\|chat\|old\|new\|gmail\|sms\|call" | sort -n | sed 1q | formatShortcut i inbox $1
- grep -i /tmp/$1_boxes -e sent | formatShortcut s sent $1
- grep -i /tmp/$1_boxes -e draft | formatShortcut d drafts $1
- grep -i /tmp/$1_boxes -e trash | formatShortcut t trash $1
- grep -i /tmp/$1_boxes -e spam | formatShortcut S spam $1
- grep -i /tmp/$1_boxes -e archive | formatShortcut a archive $1
+ grep -i /tmp/$1_boxes -e sent | sed 1q | formatShortcut s sent $1
+ grep -i /tmp/$1_boxes -e draft | sed 1q | formatShortcut d drafts $1
+ grep -i /tmp/$1_boxes -e trash | sed 1q | formatShortcut t trash $1
+ grep -i /tmp/$1_boxes -e spam | sed 1q | formatShortcut S spam $1
+ grep -i /tmp/$1_boxes -e archive | sed 1q | formatShortcut a archive $1
spoolfile=$(grep -vi /tmp/$1_boxes -e "trash\|drafts\|sent\|trash\|spam\|junk\|archive\|chat\|old\|new\|gmail\|sms\|call" | sort -n | sed 1q | sed -e 's/=/+/g')
- record=$(grep -i /tmp/$1_boxes -e sent | sed -e 's/=/+/g')
- postponed=$(grep -i /tmp/$1_boxes -e draft | sed -e 's/=/+/g')
+ record=$(grep -i /tmp/$1_boxes -e sent | sed -e 's/=/+/g' | sed 1q)
+ postponed=$(grep -i /tmp/$1_boxes -e draft | sed -e 's/=/+/g' | sed 1q)
echo "set spoolfile = \"$spoolfile\"" >> "$muttdir"accounts/$1.muttrc
echo "set record = \"$record\"" >> "$muttdir"accounts/$1.muttrc
echo "set postponed = \"$postponed\"" >> "$muttdir"accounts/$1.muttrc ;}
@@ -149,6 +149,9 @@ addAccount() {
shred -u /tmp/$title
mv /tmp/$title.gpg ~/.config/mutt/credentials/
+ # Adding directory structure for cache.
+ mkdir -p "$muttdir"accounts/$title/cache/bodies
+
# Creating the offlineimaprc if it doesn't exist already.
if [ ! -f ~/.offlineimaprc ]; then cp "$muttdir"autoconf/offlineimap_header ~/.offlineimaprc; fi
cat "$muttdir"autoconf/offlineimap_profile | sed -e "$replacement" >> ~/.offlineimaprc
@@ -159,9 +162,6 @@ addAccount() {
# Add a numbered shortcut in the muttrc
echo "macro index,pager i$idnum '<sync-mailbox><enter-command>source "$muttdir"accounts/$title.muttrc<enter><change-folder>!<enter>'" >> "$muttdir"personal.muttrc
- # Adding directory structure for cache.
- mkdir -p "$muttdir"accounts/$title/cache/bodies
-
# Add to offlineimaprc sync list.
sed -i "s/^accounts =.*[a-zA-Z]$/&, $title/g;s/^accounts =$/accounts = $title/g" ~/.offlineimaprc