From 57415883b36cf7ac0f35312f34a6dc7f068e62dd Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Tue, 13 Jan 2015 08:52:55 -0800 Subject: [PATCH] update mutt --- mutt/.mutt/muttrc | 2 +- mutt/entrypoint.sh | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mutt/.mutt/muttrc b/mutt/.mutt/muttrc index 078e3a8..4b84746 100644 --- a/mutt/.mutt/muttrc +++ b/mutt/.mutt/muttrc @@ -5,7 +5,7 @@ set imap_user = "%GMAIL_LOGIN%" set imap_pass = "%GMAIL_PASS%" # leave blank for prompt set smtp_url = "smtps://$imap_user@smtp.gmail.com:465/" set smtp_pass = "$imap_pass" # leave blank for prompt -set from = "%GMAIL_LOGIN%" +set from = "%GMAIL_FROM%" set realname = "%GMAIL_NAME%" set signature = "~/.mutt/signature" diff --git a/mutt/entrypoint.sh b/mutt/entrypoint.sh index 4ba0d88..e6b869b 100755 --- a/mutt/entrypoint.sh +++ b/mutt/entrypoint.sh @@ -5,7 +5,7 @@ if [ ! "$GMAIL" ]; then echo >&2 'error: missing GMAIL environment variable' echo >&2 ' try running again with -e GMAIL=your-email@gmail.com' echo >&2 ' optionally, you can also specify -e GMAIL_PASS' - echo >&2 ' and also -e GMAIL_NAME="Your Name"' + echo >&2 ' -e GMAIL_NAME="Your Name" and GMAIL_FROM=email@your-domain.com' echo >&2 ' if not specified, both default to the value of GMAIL' exit 1 fi @@ -14,9 +14,14 @@ if [ ! "$GMAIL_NAME" ]; then GMAIL_NAME="$GMAIL" fi +if [ ! "$GMAIL_FROM" ]; then + GMAIL_FROM="$GMAIL" +fi + sed -i "s/%GMAIL_LOGIN%/$GMAIL/g" "$HOME/.mutt/muttrc" sed -i "s/%GMAIL_NAME%/$GMAIL_NAME/g" "$HOME/.mutt/muttrc" sed -i "s/%GMAIL_PASS%/$GMAIL_PASS/g" "$HOME/.mutt/muttrc" +sed -i "s/%GMAIL_FROM%/$GMAIL_FROM/g" "$HOME/.mutt/muttrc" if [ -d "$HOME/.gnupg" ]; then {