diff options
author | Luke <luke@lukesmith.xyz> | 2018-02-10 11:02:44 -0700 |
---|---|---|
committer | Luke <luke@lukesmith.xyz> | 2018-02-10 11:02:44 -0700 |
commit | 4b9b111d27948090fac2a96988041c318f6259d8 (patch) | |
tree | d013bd218ae4a11da85f30e2344340079272b5c2 | |
parent | 7a8ded1b6c6f9a018785e5cda90c7508ad50d8b3 (diff) |
reordering, services file added
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | autoconf/domains.csv | 3 | ||||
-rw-r--r-- | autoconf/services.csv | 7 | ||||
-rw-r--r-- | credentials/imappwd.pyc | bin | 724 -> 0 bytes | |||
-rwxr-xr-x | mutt_install.sh | 28 | ||||
-rwxr-xr-x | removeaccount.sh | 1 |
6 files changed, 27 insertions, 20 deletions
@@ -30,11 +30,3 @@ Or you can help monetarily via [Patreon](https://patreon.com/lukesmith) or [Payp ### Todo: Add settings for email accounts not unified by one domain --------- - -zoho,imap.zoho.com,993.00,smtp.zoho.com,465.00 -icloud,imap.mail.me.com,993.00,smtp.mail.me.com,587.00 -inbox.com,imap.inbox.com,993.00,smtp.inbox.com,465.00 -office365,outlook.office365.com,993.00,smtp.office365.com,587.00,INBOX,Drafts,Sent Items -hostgator,gator4171.hostgator.com,993.00,gator4171.hostgator.com,587.00 -godaddy,imap.secureserver.net,993,smtpout.secureserver.net,465 diff --git a/autoconf/domains.csv b/autoconf/domains.csv index 647af41..fb169ed 100644 --- a/autoconf/domains.csv +++ b/autoconf/domains.csv @@ -86,5 +86,6 @@ cocaine.ninja,mail.cock.li,993.00,mail.cock.li,587.00,INBOX,Drafts,Sent waifu.club,mail.cock.li,993.00,mail.cock.li,587.00,INBOX,Drafts,Sent rape.lol,mail.cock.li,993.00,mail.cock.li,587.00,INBOX,Drafts,Sent nuke.africa,mail.cock.li,993.00,mail.cock.li,587.00,INBOX,Drafts,Sent -posteo.de,posteo.de,143/993,posteo.de,587/465,INBOX,Drafts,Sent +posteo.de,posteo.de,993,posteo.de,587,INBOX,Drafts,Sent runbox.com,mail.runbox.com,993,mail.runbox.com,587,INBOX,Drafts,Sent +lukesmith.xyz,gator4171.hostgator.com,993,gator4171.hostgator.com,587,INBOX,INBOX.Drafts,INBOX.Sent diff --git a/autoconf/services.csv b/autoconf/services.csv new file mode 100644 index 0000000..b1d927a --- /dev/null +++ b/autoconf/services.csv @@ -0,0 +1,7 @@ +SERVICE,IMAP,imap port,SMTP,smtp port,spoolfile,postponed,record +"Zoho",imap.zoho.com,993,smtp.zoho.com,465,,, +"iCloud",imap.mail.me.com,993,smtp.mail.me.com,587,,, +"Inbox.com",imap.inbox.com,993,smtp.inbox.com,465,,, +"Office 365",outlook.office365.com,993,smtp.office365.com,587,INBOX,Drafts,Sent Items +"Host Gator",gator4171.hostgator.com,993,gator4171.hostgator.com,587,INBOX,INBOX.Drafts,INBOX.Sent +"GoDaddy",imap.secureserver.net,993,smtpout.secureserver.net,465,,, diff --git a/credentials/imappwd.pyc b/credentials/imappwd.pyc Binary files differdeleted file mode 100644 index 194e73c..0000000 --- a/credentials/imappwd.pyc +++ /dev/null diff --git a/mutt_install.sh b/mutt_install.sh index c9ac842..53be42b 100755 --- a/mutt_install.sh +++ b/mutt_install.sh @@ -1,4 +1,5 @@ #!/bin/bash + muttdir="$HOME/.config/mutt/" mkdir -p ~/.config/mutt/credentials @@ -16,13 +17,15 @@ fulladdr=$(\ # Check to see if domain is in domain list serverinfo=$(cat autoconf/domains.csv | grep -w ^${fulladdr##*@}) -if [ -z "$serverinfo" ]; then echo No suitable match. && exit; fi - +if [ -z "$serverinfo" ]; + then + echo No suitable match. && exit + else # Read in server data as variables IFS=, read service imap iport smtp sport spoolfile postponed record <<EOF $serverinfo EOF -clear +fi realname=$(\ dialog --title "Luke's mutt/offlineIMAP autoconfig" --inputbox "Enter the full name you'd like to be identified by on this email account." 10 60 \ @@ -61,20 +64,23 @@ replacement=" /$delet/d" + addAccount() { + # First, adding the encrypted password. + dialog --title "Luke's mutt/offlineIMAP password wizard" --passwordbox "Enter the password for the \"$title\" account." 10 60 2> /tmp/$title + gpg -r $youremail --encrypt /tmp/$title + shred -u /tmp/$title && echo "Password encrypted and memory shredded." + mv /tmp/$title.gpg ~/.config/mutt/credentials/ + + # 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 + # Add the mutt profile. cat "$muttdir"autoconf/mutt_profile | sed -e "$replacement" > "$muttdir"accounts/$title.muttrc + # Add on offlineimaprc sync list. sed -i "s/^accounts =.*[a-zA-Z]$/&, $title/g;s/^accounts =$/accounts = $title/g" ~/.offlineimaprc ;} addAccount - -dialog --title "Luke's mutt/offlineIMAP password wizard" --passwordbox "Enter the password for the \"$title\" account." 10 60 2> /tmp/$title -gpg -r $youremail --encrypt /tmp/$title -shred -u /tmp/$title && echo "Password encrypted and memory shredded." -mv /tmp/$title.gpg ~/.config/mutt/credentials/ - -echo Done lmao. -exit +clear diff --git a/removeaccount.sh b/removeaccount.sh index cfae388..e1be72e 100755 --- a/removeaccount.sh +++ b/removeaccount.sh @@ -16,6 +16,7 @@ removeAccount() { sed -ie " s/,$//g " ~/.offlineimaprc rm "$muttdir"accounts/$1.muttrc + rm "$muttdir"credentials/$1.gpg echo $1 deleted. ;} #/tmp/numbered |