(self, sender)
This processes the messages sent directly from known bounce and
        complaints daemons.
        :param sender: a known daemon email (string)
This processes the messages sent directly from known bounce and
        complaints daemons.
        :param sender: a known daemon email (string)
This processes the messages sent directly from known bounce and complaints daemons . : param sender : a known daemon email ( string )
def _process_raw_messages(self, sender):
        """
        This processes the messages sent directly from known bounce and
        complaints daemons.
        :param sender: a known daemon email (string)
        """
        self.mail.select('inbox')
        for uid, message in self._get_messages(
            f'(Header Delivered-To "{settings.RETURN_PATH_EMAIL}" '
            f'From "{sender}")'
        ):
            if message.get('X-Autoreply') or message.get('Auto-Submitted'):
                self._handle_raw_transient_bounces(uid)
            else:
                recipients = self._get_raw_bounce_recipients(message)
                if recipients:
                    self._handle_raw_bounced_recipients(recipients, uid)
                else:
                    metrics_counter('commcare.bounced_email_manager.recipient_unknown')
                    self._label_problem_email(
                        uid,
                        extra_labels=["RecipientUnknown"]
                    )
                    _bounced_email_soft_assert(
                        False,
                        f'[{settings.SERVER_ENVIRONMENT}] '
                        f'Could not find a bounced email recipients. '
                        f'Check inbox for "RecipientUnknown" tag'
                    )
def _process_raw_messages ( self , sender ) : self . mail . select ( 'inbox' ) for uid , message in self . _get_messages ( f'(Header Delivered-To "{settings.RETURN_PATH_EMAIL}" ' f'From "{sender}")' ) : if message . get ( 'X-Autoreply' ) or message . get ( 'Auto-Submitted' ) : self . _handle_raw_transient_bounces ( uid ) else : recipients = self . _get_raw_bounce_recipients ( message ) if recipients : self . _handle_raw_bounced_recipients ( recipients , uid ) else : metrics_counter ( 'commcare.bounced_email_manager.recipient_unknown' ) self . _label_problem_email ( uid , extra_labels = [ "RecipientUnknown" ] ) _bounced_email_soft_assert ( False , f'[{settings.SERVER_ENVIRONMENT}] ' f'Could not find a bounced email recipients. ' f'Check inbox for "RecipientUnknown" tag' )