diff --git a/app/src/main/java/eu/faircode/email/EntityRule.java b/app/src/main/java/eu/faircode/email/EntityRule.java index 09147a1ae0..d53da6af59 100644 --- a/app/src/main/java/eu/faircode/email/EntityRule.java +++ b/app/src/main/java/eu/faircode/email/EntityRule.java @@ -1010,9 +1010,10 @@ public class EntityRule { boolean resend = jargs.optBoolean("resend"); boolean attached = jargs.optBoolean("attached"); boolean attachments = jargs.optBoolean("attachments"); + boolean checks = jargs.optBoolean("checks", true); if (TextUtils.isEmpty(to)) { - if (Boolean.TRUE.equals(message.auto_submitted)) { + if (checks && Boolean.TRUE.equals(message.auto_submitted)) { EntityLog.log(context, EntityLog.Type.Rules, message, "Auto submitted rule=" + name); return false; } @@ -1023,7 +1024,7 @@ public class EntityRule { return false; } - if (MessageHelper.isNoReply(recipients)) { + if (checks && MessageHelper.isNoReply(recipients)) { EntityLog.log(context, EntityLog.Type.Rules, message, "No-reply rule=" + name); return false; } diff --git a/app/src/main/java/eu/faircode/email/FragmentRule.java b/app/src/main/java/eu/faircode/email/FragmentRule.java index a1c59b4151..bb748a18b2 100644 --- a/app/src/main/java/eu/faircode/email/FragmentRule.java +++ b/app/src/main/java/eu/faircode/email/FragmentRule.java @@ -167,6 +167,7 @@ public class FragmentRule extends FragmentBase { private CheckBox cbResend; private CheckBox cbAttached; private CheckBox cbCc; + private CheckBox cbChecks; private Button btnTtsSetup; private Button btnTtsData; @@ -372,6 +373,7 @@ public class FragmentRule extends FragmentBase { cbResend = view.findViewById(R.id.cbResend); cbAttached = view.findViewById(R.id.cbAttached); cbCc = view.findViewById(R.id.cbCc); + cbChecks = view.findViewById(R.id.cbChecks); btnTtsSetup = view.findViewById(R.id.btnTtsSetup); btnTtsData = view.findViewById(R.id.btnTtsData); @@ -1446,6 +1448,7 @@ public class FragmentRule extends FragmentBase { cbResend.setChecked(jaction.optBoolean("resend")); cbAttached.setChecked(jaction.optBoolean("attached")); cbCc.setChecked(jaction.optBoolean("cc")); + cbChecks.setChecked(jaction.optBoolean("checks", true)); break; case EntityRule.TYPE_SOUND: @@ -1876,6 +1879,7 @@ public class FragmentRule extends FragmentBase { jaction.put("resend", cbResend.isChecked()); jaction.put("attached", cbAttached.isChecked()); jaction.put("cc", cbCc.isChecked()); + jaction.put("checks", cbChecks.isChecked()); break; case EntityRule.TYPE_SOUND: diff --git a/app/src/main/res/layout/fragment_rule.xml b/app/src/main/res/layout/fragment_rule.xml index 3e771e39b6..51bc147a74 100644 --- a/app/src/main/res/layout/fragment_rule.xml +++ b/app/src/main/res/layout/fragment_rule.xml @@ -1236,6 +1236,16 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/cbAttached" /> + + + app:layout_constraintTop_toBottomOf="@id/cbChecks" />