Package Products :: Package ZenEvents :: Module MailProcessor :: Class MessageProcessor |
[hide private]
[frames] | no frames]

# Class MessageProcessor

source code

    object --+
             |
            MessageProcessor

Known Subclasses:
  - POPProcessor
  - , MailProcessor

Base class for parsing email messages that are retrieved via POP or received via SMTP.

Instance Methods | [hide private]
__init__(self, zem, defaultSeverity=2) Initializer | source code
process(self, messageStr) Convert an e-mail message into a Zenoss event. | source code
enrich(self, event, subject) Sanitize the event facility and severity fields. | source code
simple class |
buildEventClassKey(self, evt) Set the Zenoss eventClassKey | source code

Method Details | [hide private]

### __init__(self, zem, defaultSeverity=2) (Constructor) | source code
Initializer Parameters: `zem` (Zenoss event manager object) - class that provides sendEvent() method `defaultSeverity` (integer) - severity level to use if we can't figure one out Overrides: object.__init__

### process(self, messageStr) | source code
Convert an e-mail message into a Zenoss event. Parameters: `messageStr` (string) - e-mail message

### enrich(self, event, subject) | source code
Sanitize the event facility and severity fields. Parameters: `event` (simple class) - event `subject` (string) - e-mail subject (unused)

### buildEventClassKey(self, evt) | source code
Set the Zenoss eventClassKey Parameters: `evt` (simple class) - event Returns: simple class modified event