summaryrefslogtreecommitdiff
path: root/sendmail
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2020-06-20 11:26:38 -0700
committerBen Sima <ben@bsima.me>2020-06-24 09:05:04 -0700
commitf3636615bacf683610588021d8d2c5db7d728c11 (patch)
treed8b07c1791932af7f20b29e601548454a88ce12d /sendmail
parent0bf6b946b613627eb971cb99115ba1c091d67df9 (diff)
add notes to sendmail
Diffstat (limited to 'sendmail')
-rwxr-xr-xsendmail10
1 files changed, 7 insertions, 3 deletions
diff --git a/sendmail b/sendmail
index bda9d7a..26a174c 100755
--- a/sendmail
+++ b/sendmail
@@ -1,7 +1,11 @@
#! /usr/bin/env sh
-## pass all params to msmtpq & redirect output
-msmtpq \
- "$@" >> ~/tmp/msmtp.log 2> ~/tmp/msmtp.err
+# msmtpq has weird exit semantics. if it fails to send, it returns a bunch of
+# text which emacs treats as "failure to send" but msmtpq treats as "added to
+# outbot to send later". i guess exit code is not respected by emacs? anyway,
+# msmtpq does not drop messages, but saves them in a queue, so we can just fire
+# and forget. next time we get online, msmtpq will send all the messages in the
+# queue.
+msmtpq "$@" >> ~/tmp/msmtp.log 2> ~/tmp/msmtp.err
exit 0