dmc

dynamic mail client
git clone git://git.suckless.org/dmc
Log | Files | Refs | README | LICENSE

commit 49626548e89ca0c269c8820501a3ef3cd5cc2b90
parent 1ac22a02e60002f12a6073a9dcce9b3a4f57e05d
Author: pancake@localhost.localdomain <unknown>
Date:   Tue, 20 Oct 2009 02:41:01 +0200

* Add some tips about the correct use of the SSL certs
* Simplify the fifo creation
* Add X-Mailer in default mail template (dmc -m)
Diffstat:
dmc | 15+++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/dmc b/dmc @@ -19,17 +19,19 @@ function acc_daemon { INPUT=~/.dmc/tmp/${NAME}.input OUTPUT=~/.dmc/tmp/${NAME}.output - if [ ${SSL} = 1 ]; then + if [ "${SSL}" = 1 ]; then NETCMD="openssl s_client -quiet -host $HOST -port $POST" + # TODO: Add decent support for certification check and reviewing + # First connection must store the certificate in ~/.dmc/acc/ssl.cert + # NETCMD="openssl s_client -cert '${CERT}' -verify 1 -quiet -host $HOST -port $POST" else NETCMD="nc $HOST $PORT" fi echo "Starting $NAME account daemon..." - rm -f ${INPUT} - mkfifo ${INPUT} - mkfifo ${FIFO} + rm -f "${INPUT}" "${FIFO}" + mkfifo "${INPUT}" "${FIFO}" echo login ${USER} ${PASS} > ${INPUT} & (while : ; do cat ${INPUT} 2> /dev/null ; done) | \ dmc-${PROTOCOL} $FIFO 2> ${OUTPUT} | $NETCMD > $FIFO @@ -91,8 +93,9 @@ function edit_message { OUTDIR=~/.dmc/box/${NAME}/out mkdir -p ${OUTDIR} OUT="`mktemp ${OUTDIR}/mail.XXXXXX`" - echo "From: ${MAIL}" > $OUT - echo "To: ${TO}" > $OUT + echo "X-Mailer: dmc v${VERSION}" > $OUT + echo "From: ${MAIL}" >> $OUT + echo "To: ${TO}" >> $OUT echo "Subject: ${SUBJECT}" >> $OUT echo "" >> $OUT echo "" >> $OUT