Browse code

Fix: X-BM-MILTER-HANDLED does not rely on executed action count

Thomas Fricker authored on 13/04/2018 10:17:58
Showing 1 changed files
... ...
@@ -130,10 +130,8 @@ public class MilterHandler implements JilterHandler {
130 130
 		String milterHeader = "X-BM-MILTER-HANDLED";
131 131
 		if (message.getHeader().getField(milterHeader) == null) {
132 132
 			int appliedActions = applyActions(smtpEnvelope, message, modifiedMail);
133
-			if (appliedActions > 0) {
134
-				logger.debug("Applied {} milter actions", appliedActions);
135
-				modifiedMail.newHeaders.add(new RawField(milterHeader, "" + System.currentTimeMillis()));
136
-			}
133
+			logger.debug("Applied {} milter actions", appliedActions);
134
+			modifiedMail.newHeaders.add(new RawField(milterHeader, "" + System.currentTimeMillis()));
137 135
 		}
138 136
 		if (!modifiedMail.bodyChangedBy.isEmpty()) {
139 137
 			logger.debug("replacing body ({})", modifiedMail.bodyChangedBy);