def parse_delivery_event(self, event):
        """ Parse a single Delivery event
        Based on:
        - Delivered (is the mail delivered at all)
        - UseTls (was tls used)
        :param event: event to be parsed (single line in log)
        :return: parsed event
        """
        delivered = event['Delivered'] if 'Delivered' in event else None
        use_tls = event['UseTls'] if 'UseTls' in event else None
        if delivered is not None:
            if delivered == 'true':
                if use_tls == 'Yes':
                    event_id = 'mail_delivery_delivered'
                else:
                    event_id = 'mail_delivery_delivered_notls'
            else:
                event_id = 'mail_delivery_not_delivered'
        else:
            event_id = 'mail_delivery_other'
        category = 'mail_delivery'
        timestamp = self.date_helper.convert_from_mimecast_format(event['datetime'])
        event.update({'mimecastEventId': event_id, 'mimecastEventCategory': category, 'time_generated': timestamp})

        return event
 Parse a single Delivery event
        Based on:
        - Delivered (is the mail delivered at all)
        - UseTls (was tls used)
        :param event: event to be parsed (single line in log)
        :return: parsed event
        
Solutions/MimecastSEG/Data Connectors/TransformData/siem_parser.py