Skip to content

FR: Handle SRS log entries correctly

I am assuming this is more a feature request than a bug. The issue is that when SRS is installed and configured (https://github.com/roehling/postsrsd), LightMeter Control Center doesn't interpret or transform the SRS addresses, so things like Message Detective are very limited (e.g. all addresses are from the same domain) and likely other functionality such as the insights and domain statistics are affected by this.

Ideally, if SRS entries are detected in the logs, they would be corrected or transformed as such:

SRS0=ukeS=H3=realdomain.com=user@maindomain.com

interpreted as...

user@realdomain.com

This obviously should be simple string manipulation, but I am not a developer so don't know how to properly contribute to this. Logic would be:

If entry starts with "SRS0", split the string using the @ symbol to get an array of:

{"SRS0=ukeS=H3=realdomain.com=user","maindomain.com"}

Grab [0] from the resulting array, and split that using the = symbol to get a new array of:

{"SRS0","ukeS","H3","realdomain.com","user"}

Grab the last two entries of the array, and chuck them into a new string, swapping them around and putting an @ symbol between them, like:

user@realdomain.com

Very basic, but just trying to be as clear as possible.