def rule(event):
    if any(
        [
            all(
                [
                    "UpdateInboxRules" in event.deep_get("Operation", default=""),
                    any(
                        [
                            "Forward" in event.deep_get("OperationProperties", default=""),
                            "Recipients" in event.deep_get("OperationProperties", default=""),
                        ]
                    ),
                ]
            ),
            all(
                [
                    "Set-Mailbox" in event.deep_get("Operation", default=""),
                    any(
                        [
                            "ForwardingSmtpAddress" in event.deep_get("Parameters", default=""),
                            "ForwardingAddress" in event.deep_get("Parameters", default=""),
                        ]
                    ),
                ]
            ),
            all(
                [
                    any(
                        [
                            "New-InboxRule" in event.deep_get("Operation", default=""),
                            "Set-InboxRule" in event.deep_get("Operation", default=""),
                        ]
                    ),
                    any(
                        [
                            "ForwardAsAttachmentTo" in event.deep_get("Parameters", default=""),
                            "ForwardingAddress" in event.deep_get("Parameters", default=""),
                            "ForwardingSmtpAddress" in event.deep_get("Parameters", default=""),
                            "ForwardTo" in event.deep_get("Parameters", default=""),
                            "RedirectTo" in event.deep_get("Parameters", default=""),
                            "RedirectToRecipients" in event.deep_get("Parameters", default=""),
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
