reordering, services file added
This commit is contained in:
parent
7a8ded1b6c
commit
4b9b111d27
@ -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
|
### 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
|
|
||||||
|
@ -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
|
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
|
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
|
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
|
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
|
||||||
|
|
7
autoconf/services.csv
Normal file
7
autoconf/services.csv
Normal file
@ -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,,,
|
|
Binary file not shown.
@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
muttdir="$HOME/.config/mutt/"
|
muttdir="$HOME/.config/mutt/"
|
||||||
mkdir -p ~/.config/mutt/credentials
|
mkdir -p ~/.config/mutt/credentials
|
||||||
|
|
||||||
@ -16,13 +17,15 @@ fulladdr=$(\
|
|||||||
|
|
||||||
# Check to see if domain is in domain list
|
# Check to see if domain is in domain list
|
||||||
serverinfo=$(cat autoconf/domains.csv | grep -w ^${fulladdr##*@})
|
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
|
# Read in server data as variables
|
||||||
IFS=, read service imap iport smtp sport spoolfile postponed record <<EOF
|
IFS=, read service imap iport smtp sport spoolfile postponed record <<EOF
|
||||||
$serverinfo
|
$serverinfo
|
||||||
EOF
|
EOF
|
||||||
clear
|
fi
|
||||||
|
|
||||||
realname=$(\
|
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 \
|
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"
|
/$delet/d"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addAccount() {
|
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
|
if [ ! -f ~/.offlineimaprc ]; then cp "$muttdir"autoconf/offlineimap_header ~/.offlineimaprc; fi
|
||||||
cat "$muttdir"autoconf/offlineimap_profile | sed -e "$replacement" >> ~/.offlineimaprc
|
cat "$muttdir"autoconf/offlineimap_profile | sed -e "$replacement" >> ~/.offlineimaprc
|
||||||
|
|
||||||
# Add the mutt profile.
|
# Add the mutt profile.
|
||||||
cat "$muttdir"autoconf/mutt_profile | sed -e "$replacement" > "$muttdir"accounts/$title.muttrc
|
cat "$muttdir"autoconf/mutt_profile | sed -e "$replacement" > "$muttdir"accounts/$title.muttrc
|
||||||
|
|
||||||
# Add on offlineimaprc sync list.
|
# Add on offlineimaprc sync list.
|
||||||
sed -i "s/^accounts =.*[a-zA-Z]$/&, $title/g;s/^accounts =$/accounts = $title/g" ~/.offlineimaprc ;}
|
sed -i "s/^accounts =.*[a-zA-Z]$/&, $title/g;s/^accounts =$/accounts = $title/g" ~/.offlineimaprc ;}
|
||||||
|
|
||||||
addAccount
|
addAccount
|
||||||
|
clear
|
||||||
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
|
|
||||||
|
@ -16,6 +16,7 @@ removeAccount() { sed -ie "
|
|||||||
s/,$//g
|
s/,$//g
|
||||||
" ~/.offlineimaprc
|
" ~/.offlineimaprc
|
||||||
rm "$muttdir"accounts/$1.muttrc
|
rm "$muttdir"accounts/$1.muttrc
|
||||||
|
rm "$muttdir"credentials/$1.gpg
|
||||||
echo $1 deleted. ;}
|
echo $1 deleted. ;}
|
||||||
|
|
||||||
#/tmp/numbered
|
#/tmp/numbered
|
||||||
|
Loading…
Reference in New Issue
Block a user