Skip Menu |

This queue is for tickets about the Parse-Syslog-Mail CPAN distribution.

Report information
The Basics
Id: 97264
Status: new
Priority: 0/
Queue: Parse-Syslog-Mail

People
Owner: Nobody in particular
Requestors: aaronp [...] critd.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Parse::Syslog::Mail suggestion
Date: Tue, 15 Jul 2014 17:14:47 -0500
To: bug-parse-syslog-mail [...] rt.cpan.org
From: Aaron Paetznick <aaronp [...] critd.com>
I wanted to use this module to report on the authid=? data in my sendmail log file. To do this, I had to make the following changes: 1) on line 206, I commented out this line: #redo LINE unless $id; 2) starting on line 222, I replaced the %mail map{} block with this: foreach my $i (split /\t/, $text) { $i =~ s/,$//; $i =~ s/^ +//; $i =~ s/ +$//; # cleaning spaces $i =~ s/^\s+([\w-]+=)/$1/; # cleaning up field names my($k, $v) = split /=/, $i, 2; # no more than 2 elements $mail{$k} = $v if defined $k && defined $v; } 3) on line 247, I added an "if defined" qualifier like this: $mail{id} = $id if defined $id; These three changes made this module much more useful for me. Maybe you could consider making similar changes to the official release, maybe if passed an argument? Thanks for your excellent software! --Aaron