fi
fi
else
- # the anti-replay mechanism detected a repeated message
- MESSAGE_BODY="\
+
+ # if bounce processing is enabled, continue
+ if [[ "$SILENTLY_DISCARD_INVALID_MESSAGES" != "1" ]]; then
+
+ GetSenderAddress
+ if [[ -n "$SENDER_ADDRESS" ]]; then
+
+ # the anti-replay mechanism detected a repeated message
+ MESSAGE_BODY="\
It was not possible to process this message. This list
is configured to discard replayed messages as an attack
protection measure. It looks like your message has been
sent to the list before and so it was discarded. Contact
the list administrator if you have any questions."
- ComposeAndSendBounceMessage
+ ComposeAndSendBounceMessage
+ fi
+ fi
fi
-
# else, message wasn't encrypted at all
# send a bounce, if possible
else
local -i return_code=0
local sha1
- if [[ "$REPLAY_PROTECTION" == "1" ]]; then
+ if [[ "$REPLAY_PROTECTION" == "1" && -n "$ORIG_GPG_MESSAGE" ]]; then
ReplayProtectionFlush
- sha1="$(echo "$GPG_MESSAGE" | sha1sum | cut -d " " -f 1)"
+ sha1="$(echo "$ORIG_GPG_MESSAGE" | sha1sum | cut -d " " -f 1)"
if grep -q "^$sha1$" $REPLAY_FILE; then
sed -i -e "/^$sha1$/d" $REPLAY_FILE
return_code=1