+#ifdef EXPERIMENTAL_BRIGHTMAIL
+/* check if a specific Brightmail AntiSpam rule fired on the message */
+if (r->bmi_rule != NULL) {
+ DEBUG(D_route) debug_printf("checking bmi_rule\n");
+ if (bmi_check_rule(bmi_base64_verdict, r->bmi_rule) == 0) {
+ /* none of the rules fired */
+ DEBUG(D_route)
+ debug_printf("%s router skipped: none of bmi_rule rules fired\n", r->name);
+ return SKIP;
+ };
+};
+
+/* check if message should not be delivered */
+if (r->bmi_dont_deliver) {
+ if (bmi_deliver == 1) {
+ DEBUG(D_route)
+ debug_printf("%s router skipped: bmi_dont_deliver is FALSE\n", r->name);
+ return SKIP;
+ };
+};
+
+/* check if message should go to an alternate location */
+if (r->bmi_deliver_alternate) {
+ if ((bmi_deliver == 0) || (bmi_alt_location == NULL)) {
+ DEBUG(D_route)
+ debug_printf("%s router skipped: bmi_deliver_alternate is FALSE\n", r->name);
+ return SKIP;
+ };
+};
+
+/* check if message should go to default location */
+if (r->bmi_deliver_default) {
+ if ((bmi_deliver == 0) || (bmi_alt_location != NULL)) {
+ DEBUG(D_route)
+ debug_printf("%s router skipped: bmi_deliver_default is FALSE\n", r->name);
+ return SKIP;
+ };
+};
+#endif
+