_ = XLATOR.gettext
ngettext = XLATOR.ngettext
-__version__ = '0.4.1'
+__version__ = '0.4.2'
# =============================================================================
re_dis_mail = re.compile(r'\smail=(\d+)', re.IGNORECASE)
re_message_id = re.compile(r'message-id=(\S+)', re.IGNORECASE)
+ re_bounce_id = re.compile(
+ r'sender\s+non-delivery\s+notification:\s+(?P<bounce_id>\S+)', re.IGNORECASE)
re_from_addr = re.compile(
r'^\s*from=<(?P<from>[^>]*)>,\s+size=(?P<size>\d+),\s+nrcpt=(?P<nrcpt>\d+)',
if smtpd_done:
return
+ if command == 'postfix/bounce':
+ m = self.re_bounce_id.match(message)
+ if m:
+ bid = m['bounce_id'].strip()
+ if bid:
+ self.chain[postfix_id].add_bounce_id(bid)
+ return
+
if self.verbose > 1:
msg = f'Evaluating further entry of {command!r} for Postfix Id {postfix_id!r}: '
LOG.debug(msg + message)