eldy / AWStats

AWStats Log Analyzer project (official sources)
https://www.awstats.org
364 stars 121 forks source link

Unwrap SRS e-mail addresses #193

Closed smortex closed 3 years ago

smortex commented 3 years ago

When building statistics from mail servers, messages which where processed by Sender Rewriting Scheme (SRS) are mis-classified as internal mail while they are external, and appear to come from a huge number of different addresses which in fact correspond to the same actual sender.

Add a rewriting function that process such addresses and extract the relevant information from it.

With this change, the addresses SRS0=HHH=TT=example.org=alice@example.com and SRS1=HHH=example.com==HHH=TT=example.org=alice@example.net are converted to alice@example.org, the actual sender.