aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/email2
-rwxr-xr-xbin/mailcfg12
2 files changed, 9 insertions, 5 deletions
diff --git a/bin/email b/bin/email
index deaf0f0..87d1cec 100755
--- a/bin/email
+++ b/bin/email
@@ -70,4 +70,4 @@ eval "$(assert-arg "${1:-}" 'ADDRESS')"
printf 'Content-Type: text/plain; charset=UTF-8\nSubject: %s\n\n%s' \
"$(echo "$SUBJECT" | tr -d '\n')" \
"$(cat)" |
- msmtpq -a euandreh "$@"
+ msmtpq -a EuAndreh "$@"
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