From b6248f3089d7df93035bbbc0c11edf50709d5eb0 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Mon, 1 Jun 2020 13:09:33 +0200 Subject: [PATCH] hooks: Fix output of command -v dkimsign added to message When checking if the dkimsign command exists, the default hook doesn't redirect the output to /dev/null, so if the command is present it will emit unwanted output (interpreted as message headers, as expected). This patch adds the missing redirection. Amended-by: Alberto Bertogli Extended commit message. --- etc/chasquid/hooks/post-data | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/chasquid/hooks/post-data b/etc/chasquid/hooks/post-data index ae24315..87fa507 100755 --- a/etc/chasquid/hooks/post-data +++ b/etc/chasquid/hooks/post-data @@ -80,7 +80,7 @@ fi # - certs/$DOMAIN/dkim_privkey.pem file exists. # # Note this has not been thoroughly tested, so might need further adjustments. -if [ "$AUTH_AS" != "" ] && command -v dkimsign; then +if [ "$AUTH_AS" != "" ] && command -v dkimsign >/dev/null; then DOMAIN=$( echo "$MAIL_FROM" | cut -d '@' -f 2 ) if [ -f "domains/$DOMAIN/dkim_selector" ] \ && [ -f "certs/$DOMAIN/dkim_privkey.pem" ]; then