aboutsummaryrefslogtreecommitdiff
path: root/bin/mailcfg
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mailcfg')
-rwxr-xr-xbin/mailcfg12
1 files changed, 8 insertions, 4 deletions
diff --git a/bin/mailcfg b/bin/mailcfg
index ea53a31..86aab17 100755
--- a/bin/mailcfg
+++ b/bin/mailcfg
@@ -37,6 +37,7 @@ help() {
One of the files also needs to define:
- $DEFAULT_NAME
- $DEFAULT_ADDR
+ - $DEFAULT_LABEL
An example of such file could be "30-andre@work.com.env":
@@ -161,7 +162,7 @@ msmtp() {
cat <<-EOF
- account default : $DEFAULT_LABEL_LC
+ account default : $DEFAULT_LABEL
EOF
}
@@ -209,7 +210,10 @@ notmuchhook() {
LABELS="$LABELS $LABEL"
fi
done
- sed "s|@DIRS@|$LABELS|g" "$CFGDIR"/post-new
+ sed \
+ -e "s|@DIRS@|$LABELS|g" \
+ -e "s|@DEFAULT_LABEL@|$DEFAULT_LABEL|g" \
+ "$CFGDIR"/post-new
}
alot() {
@@ -256,10 +260,10 @@ alot() {
for env in "$CFGDIR"/*.env; do
. "$env"
cat <<-EOF
- [[$LABEL_LC]]
+ [[$LABEL]]
realname = $NAME
address = $ADDR
- sendmail_command = msmtpq --account=$LABEL_LC -t
+ sendmail_command = msmtpq --account=$LABEL -t
sent_box = maildir://~/Maildir/$LABEL/Sent
draft_box = maildir://~/Maildir/$LABEL/Drafts
gpg_key = 5BDAE9B8B2F6C6BCBB0D6CE581F90EC3CD356060