def rule(event):
    if all(
        [
            any(
                [
                    "New-InboxRule" in event.deep_get("ScriptBlockText", default=""),
                    "Set-InboxRule" in event.deep_get("ScriptBlockText", default=""),
                    "Set-Mailbox" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
            any(
                [
                    "ForwardAsAttachmentTo" in event.deep_get("ScriptBlockText", default=""),
                    "ForwardingAddress" in event.deep_get("ScriptBlockText", default=""),
                    "ForwardingSmtpAddress" in event.deep_get("ScriptBlockText", default=""),
                    "ForwardTo" in event.deep_get("ScriptBlockText", default=""),
                    "RedirectTo" in event.deep_get("ScriptBlockText", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
