MAN page from Mandrake Other perl-SyslogScan-0.32-1.i386.rpm
SyslogScan::SendmailLine
Section: User Contributed Perl Documentation (3)
Updated: perl 5.004, patch 04
Index NAME
SyslogScan::SendmailLine -- Enhances basic SyslogEntry parsing byunderstanding sendmail to/from message syntax.
DESCRIPTION
Suppose I run a `new SyslogEntry' command and read in the following line:
Jun 13 01:32:26 satellife sendmail[23498]: WAA18677:to=bar@foo.org,bazAATTfoo.org, delay=03:50:20, mailer=smtp,relay=relay.ulthar.com [128.206.5.3],stat=Sent (May, have (embedded, commas))
If I have not loaded in SendmailLine, then `new SyslogEntry' will returnan `UnsupportedEntry' object looking like this:
month => Jun, day => 13, time => 01:32:26, machine => satellife, executable => sendmail, tag => 23498, content => WAA18677: to=bar@foo.org,bazAATTfoo.org, delay=03:50:20, ...
On the other hand, if I have a `use SyslogScan::SendmailLine' commandbefore my call to `new SyslogEntry', then I will a `SendmailLine'object with all of the above parameters, plus the following additionalparameters:
messageID => WAA18677 toList => ( bar@foo.org, bazAATTfoo.org ) attrHash => ( to => "bar@foo.org,bazAATTfoo.org", delay => "03:50:20", mailer => "smtp", relay => "relay.ulthar.com [128.206.5.3]", stat => "Sent (May, have (embedded, commas))" )
Also well-supported is the `From' line:
Jun 13 01:34:54 satellife sendmail[26035]: BAA26035: from=<bar!baz!foo>,size=7000, class=0, pri=37000, nrcpts=1,msgid=<199606130634.BAA26035AATTsatellife.healthnet.org>,proto=SMTP, relay=uth.bar.com [155.247.14.2]
will produce a SendmailLine object with the additional attributes of
messageID => BAA26035 attrHash => ( from => "<bar!baz!foo>", size => "7000", class => "0", pri => "37000" nrcpts => "1", msgid => "<199606130634.BAA26035AATTsatellife.healthnet.org>", proto => "SMTP", relay => "uth.bar.com [155.247.14.2]" )
Other types of lines are legal, but are not currently very thorouglyparsed, and therefore return somewhat minimal SendmailLine objects.
Jun 13 13:05:35 satellife sendmail[19620]: NAA19606: NAA19620:return to sender: unknown mailer error 2
will return a SendmailLine object with the usual SyslogEntry attributes,plus the single additional attribute of
messageID => NAA19606
while lines like the following produce SendmailLine objects with noadditional SendmailLine-specific attributes:
Jun 13 03:00:05 satellife sendmail[26611]: alias database/var/yp/nis.healthnet.org/mail.aliases rebuilt by root
Note this is a subclass for SyslogScan::SyslogEntry which handlescertain types of logfile lines. See the documentation for SyslogEntryfor further details of how SyslogEntry subclassing works.
Also, see the SyslogScan::SendmailLineFrom andSyslogScan::SendmailLineTo modules for examples of returnedSendmailLine objects.
AUTHOR and COPYRIGHT
The author (Rolf Harold Nelson) can currently be e-mailed asrolfAATTusa.healthnet.org.
This code is Copyright (C) SatelLife, Inc. 1996. All rights reserved.This code is free software; you can redistribute it and/or modify itunder the same terms as Perl itself.
In no event shall SatelLife be liable to any party for direct,indirect, special, incidental, or consequential damages arising out ofthe use of this software and its documentation (including, but notlimited to, lost profits) even if the authors have been advised of thepossibility of such damage.
SEE ALSO
the
SyslogScan::SyslogEntry manpage, the
SyslogScan::SendmailLineFrom manpage,the
SyslogScan::SendmailLineTo manpage
understanding sendmail to/from message syntax."
Index
- NAME
- DESCRIPTION
- AUTHOR and COPYRIGHT
- SEE ALSO
This document was created byman2html,using the manual pages.