For more privacy, you can anonymize your log somewhat before sending it to a responder. Lire includes a command called lr_anonymize which will transform everything that looks like an IP address, an email or a domain name into an anonymized form (10.0.0.1, 2.0.0.10.in-addr.arpa, 11.example.com, <john.doe@2.example.com>, etc.) The mapping between the real value and its anonymized form is saved in a disk database so that you can reverse the process when you receive the report from the responder.
The procedure is quite simple, you just have to filter your log file through lr_anonymize and make sure that the subject of your email starts with anon.
Example 3.5. Sending An Anonymized Postfix Log File To A Responder
To send an anonymized postfix log file to the Stichting LogReport Foundation responder, you would use a command like:
$ grep ' postfix/' /var/log/mail.log | \ lr_run lr_anonymize /tmp/anon | \ mail -s "anon Daily Report" log@postfix.logreport.org
The /tmp/anon is the database that is used to save the mapping between the real and anonymized values.
lr_anonymize will overwrite the content of that database, so if you reuse the database, make sure that you don't have two concurrent requests to a responder because you will lose the first mappings!
The responder will generate a report in an XML format specific to Lire. To obtain a "normal" report from this, you first deanonymize it, then run the appropriate converter on the deanonymized report. You use the lr_xml2report command to convert a XML report to one of the available output formats.
You can list the output-formats available on your system by running lr_xml2report --help output-formats.
Example 3.6. Deanonymizing and Generating A HTML Report
To generate a HTML report from the XML report you received from the responder, you would use the following command:
$ lr_run lr_deanonymize /tmp/anon < /tmp/anon-report.xml > /tmp/report.xml $ lr_xml2report --output html /tmp/report.xml /tmp/report.html