from ..handler.pflogparse import PostfixLogfileParser
from ..xlate import XLATOR
-__version__ = '0.5.1'
+__version__ = '0.6.0'
LOG = logging.getLogger(__name__)
_ = XLATOR.gettext
self.logfiles = []
self.per_domain = {}
+ self.per_address = {}
self.show_address_results = False
if not chain.from_address:
continue
+ address = str(chain.from_address)
domain = ''
if isinstance(chain.from_address, MailAddress):
domain = chain.from_address.domain
if loghost not in self.per_domain:
self.per_domain[loghost] = {}
-
if domain not in self.per_domain[loghost]:
self.per_domain[loghost][domain] = 0
-
self.per_domain[loghost][domain] += 1
+ if loghost not in self.per_address:
+ self.per_address[loghost] = {}
+ if address not in self.per_address[loghost]:
+ self.per_address[loghost][address] = 0
+ self.per_address[loghost][address] += 1
+
# -------------------------------------------------------------------------
def _is_local_client(self, chain):
self._collect_results()
if self.verbose > 0:
+ self.empty_line()
LOG.debug(_('Results per domain:') + '\n' + pp(self.per_domain))
+ self.empty_line()
+ LOG.debug(_('Results per address:') + '\n' + pp(self.per_address))
# =============================================================================