aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-09-05 13:01:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-09-05 13:01:02 -0300
commitdf18d0c7060007aaa757ea749bcbb66814d1f4ce (patch)
tree863efc32e2d9678f5c1c5764ee3efa40559b45d5
parentc785ca9e6e484ec4860ef1e0eb2b5f6e5653e658 (diff)
downloadfirma-df18d0c7060007aaa757ea749bcbb66814d1f4ce.tar.gz
firma-df18d0c7060007aaa757ea749bcbb66814d1f4ce.tar.bz2
Introducing HIDE_SENDER
-rwxr-xr-xfirma26
1 files changed, 26 insertions, 0 deletions
diff --git a/firma b/firma
index f4697b4..3e70e98 100755
--- a/firma
+++ b/firma
@@ -329,6 +329,21 @@ WARNING: $LIST_NAME: Setting REPLIES_SHOULD_GO_TO_LIST to '0' for this run."
REPLIES_SHOULD_GO_TO_LIST="0"
fi
+ # check HIDE_SENDER value
+ if [[ -n "$HIDE_SENDER" && \
+ "$HIDE_SENDER" != "0" && \
+ "$HIDE_SENDER" != "1"
+ ]]; then
+
+ LogMessage "\
+WARNING: $LIST_NAME: HIDE_SENDER should be set either to '0' or '1'.
+WARNING: $LIST_NAME: Setting HIDE_SENDER to '0' for this run."
+ HIDE_SENDER="0"
+
+ elif [[ -z "$HIDE_SENDER" ]]; then
+ HIDE_SENDER="0"
+ fi
+
# check REPLAY_PROTECTION value
if [[ -n "$REPLAY_PROTECTION" && \
"$REPLAY_PROTECTION" != "0" && \
@@ -693,6 +708,14 @@ Reply-To: $LIST_ADDRESS"
fi
fi
+ # hide the sender
+ if [[ "$HIDE_SENDER" == "1" ]]; then
+ MESSAGE_HEADERS="$(
+ echo "$MESSAGE_HEADERS" | \
+ sed -e "s/^From:.*$/From: $LIST_ADDRESS/I"
+ )"
+ fi
+
# insert the Subject prefix, if any
if [[ -n "$SUBJECT_PREFIX" ]]; then
@@ -2328,6 +2351,9 @@ function SourceListConfig {
[[ "$1" == "help" ]] && echo -e "\tREPLIES_SHOULD_GO_TO_LIST= set to '1' to add a Reply-To header containing the list address." || \
REPLIES_SHOULD_GO_TO_LIST="$(EvalConfigParameter $LIST_CONFIG_FILE REPLIES_SHOULD_GO_TO_LIST)"
+ [[ "$1" == "help" ]] && echo -e "\tHIDE_SENDER= set to '1' to add replace the sender address with list address on list messages." || \
+ HIDE_SENDER="$(EvalConfigParameter $LIST_CONFIG_FILE HIDE_SENDER)"
+
[[ "$1" == "help" ]] && echo -e "\tSILENTLY_DISCARD_INVALID_MESSAGES= set to '1' to silently discard invalid
\t messages (message not signed/encrypted,
\t sender not subscribed to the list, etc.)