_ = XLATOR.gettext
ngettext = XLATOR.ngettext
-__version__ = '0.5.1'
+__version__ = '0.5.2'
# =============================================================================
LOG.debug(msg)
return
- if command == 'postfix/cleanup':
+ if command == 'postfix/pickup':
m = self.re_pickup.search(message)
if m:
if postfix_id in self.chain:
self.chain[postfix_id].pickup_from = m['from']
self.chain[postfix_id].pickup_uid = m['uid']
else:
- msg = _('Did not found Postfix ID {!r} for pickup log entry.').format(
- postfix_id)
- if self.warn_on_parse_error:
- LOG.warn(msg)
- else:
- LOG.debug(msg)
+ chain = PostfixLogchainInfo(
+ start=timestamp,
+ postfix_id=postfix_id,
+ smtpd_pid=pid,
+ pickup_from=m['from'],
+ pickup_uid=m['uid'],
+ )
+ self.chain[postfix_id] = chain
return
if command == 'opendkim':
if m:
bid = m['bounce_id'].strip()
if bid:
- self.chain[postfix_id].add_bounce_id(bid)
+ if postfix_id in self.chain:
+ self.chain[postfix_id].add_bounce_id(bid)
+ else:
+ msg = _(
+ 'Did not found Postfix ID {pfid!r} for Bounce ID {bid!r}.').format(
+ pfid=postfix_id, bid=bid)
+ if self.warn_on_parse_error:
+ LOG.warn(msg)
+ else:
+ LOG.debug(msg)
return
if self.verbose > 1: