Both client and server will require the p5-File-Temp and p5-Digest-MD5 ports installed, before this will work.
All incoming reports gets saved in an archive directory, this archive directory gets read to produce the final html report. You can choose to put these files anywhere but your MTA must be able to write to the directory.
# mkdir /var/db/portauditcentral # chown mailnull:mailnull /var/db/portauditcentral
Copy the scripts and sample config dir to locations of your choice, by default it expects the config in /usr/local/etc/portaudit-receive.cfg.
Incoming mail should be piped to STDIN of the portaudit-receive.pl script, using exim you'd put a entry in your alias file that resembles this:
portaudit |/usr/local/sbin/portaudit-receive.pl
Edit the portaudit-receive.cfg file and set values as follows:
$passphrase |
All clients and server should have the same password, any string will do. |
$allowedhosts |
A list of hostnames that are allowed to send reports to this server, the hostnames here should match up with the hostname configured in the client program later on. |
$savedir |
The directory to save reports in |
$logger |
The path to your logger(1) utility, this should be a good default for FreeBSD machines |
$domain |
Regular expression to remove from hostnames in the final report this is just to make the report look nicer so you can have host1 instead of host.example.com, useful only to make the report look nicer. |
$reportfile |
Path to the html file that the report generator will produce. |
If you wish you can create a cron entry that will run portaudit-report.pl once a day to generate the days report. If you still would like an emailed report showing the summary I suggest using links in a cronjob, something like:
links -dump http://example.com/portaudit.html | mail you@example.com
