Setting up email event notifications and inventory reports by using the CLI

You can use the command-line interface (CLI) to set up your system to send event notification and inventory reports to specified recipients and your support center.

You can configure Call Home by using the CLI.

To set up, manage, and activate email event, inventory, and Call Home notifications, complete the following steps:

  1. Enable your system to use the email notification function.
    To enable email notification, use the mkemailserver CLI command. Up to six SMTP email servers can be configured to provide redundant access to the external email network.
    This example creates an email server object. It specifies the name, IP address, and port number of the SMTP email server. After you enter the command, you see a message that indicates that the email server was successfully created.
    mkemailserver -ip ip_address -port port_number
    where ip_address specifies the IP address of a remote email server and port_number specifies the port number for the email server.
  2. Add recipients of email event and inventory notifications to the email event notification facility.
    To add recipients, use the mkemailuser CLI command.
    The following example adds email recipient manager2008 and designates that this recipient is to receive email error-type event notifications.
    mkemailuser -address manager2008@ibm.com
     -error on -usertype local
    Important: Always select the local user type unless otherwise instructed by your support center. The support user type is normally only used with the Call Home feature.
  3. Set the contact information that is used by the email event notification facility.
    To set contact information, use the chemail CLI command. If you are starting the email event notification facility, these parameters must be set:
    • reply
    • contact
    • primary
    • location
    • organization
    • address
    • city
    • zip code
    • country
    If you are modifying contact information that is used by the email event notification facility, at least one of the parameters must be specified.
    The following example sets the contact information for the email recipient manager2008:
    chemail -reply manager2008@ibm.com -contact manager2008  -primary 0441234567 -location 'room 256 floor 1 IBM' -organization IBM -address '1022 IBM St' -city 'New York' -zip 102 -country US
  4. Optionally, generate a report that lists email event notification settings for all email recipients, or change or delete email recipients.
    • To generate a report that lists the email event notification settings for all email recipients, an individual email recipient, or a specified type of email recipient (local or support), use the lsemailuser CLI command.
    • To change the settings that are defined for a recipient, use the chemailuser CLI command. You must specify the user ID or name of the email recipient for whom you are modifying settings.
    • To remove a previously defined email recipient, use the rmemailuser CLI command. You must specify the user ID or name of the email recipient that you want to remove.
  5. Activate the email and inventory notification function.
    To start the email and inventory notification function, use the startemail CLI command. The startemail command takes no parameters.
    Note: Inventory information is automatically reported to service personnel when you activate error reporting.
  6. Optionally, test the email notification function to ensure that it is operating correctly and send an inventory email notification.
    The system uses the notifications settings to call home if errors occur.
    • To send a test email notification to one or more recipients, use the testemail CLI command. You must either specify all or the user ID or user name of an email recipient that you want to send a test email to.
    • To send an inventory email notification to all recipients that are enabled to receive inventory email notifications, use the sendinventoryemail CLI command. The sendinventoryemail command takes no parameters.
    • Use the stopemail command to stop the email and inventory notification function. The stopemail command takes no parameters.