def rule(event):
    if all(
        [
            event.deep_get("Initiated", default="") == "true",
            any(
                [
                    event.deep_get("Image", default="").endswith("\\excel.exe"),
                    event.deep_get("Image", default="").endswith("\\outlook.exe"),
                    event.deep_get("Image", default="").endswith("\\powerpnt.exe"),
                    event.deep_get("Image", default="").endswith("\\winword.exe"),
                    event.deep_get("Image", default="").endswith("\\wordview.exe"),
                ]
            ),
            not any(
                [
                    event.deep_get("DestinationPort", default="")
                    in [53, 80, 139, 389, 443, 445, 3268],
                    all(
                        [
                            ":\\Program Files\\Microsoft Office\\"
                            in event.deep_get("Image", default=""),
                            event.deep_get("Image", default="").endswith("\\OUTLOOK.EXE"),
                            event.deep_get("DestinationPort", default="")
                            in [143, 465, 587, 993, 995],
                        ]
                    ),
                ]
            ),
        ]
    ):
        return True
    return False
