def scan_postfix_submission_line(date, log, collector):
 m = re.match('([A-Z0-9]+): client=(\\S+), sasl_method=PLAIN, sasl_username=(\\S+)', log)
 if m:
  collector['activity-by-hour']['smtp-sends'][date.hour] += 1

def scan_postfix_submission_line ( date , log , collector ) : m = re . match ( '([A-Z0-9]+): client=(\\S+), sasl_method=PLAIN, sasl_username=(\\S+)' , log ) if m : collector [ 'activity-by-hour' ] [ 'smtp-sends' ] [ date . hour ] += 1
scan a postfix submission log line and extract interesting data .