From OpenNMS
Note: With 1.1.4, mail is handled via Java.
There is a new optional attribute called 'binary' (defaults to "false") that should be set to "true" when the command being defined is to be executed as a system command. So the config below has been updated accordingly. However, we do recommend use of the JavaMailer (javaEmail command) for sending mail.
The mail.pl script in the OpenNMS contrib directory can be a useful alternative to using /bin/mail for e-mail.
Modify the email and pagerEmail entries in notificationCommands.xml to read:
<command binary="true">
<name>email</name>
<execute>/opt/OpenNMS/bin/mail.pl</execute>
<comment>for sending email notifications</comment>
<argument streamed="false">
<switch>-email</switch>
</argument>
<argument streamed="false">
<substitution>opennms@mycompany.com</substitution>
</argument>
<argument streamed="false">
<switch>-subject</switch>
</argument>
<argument streamed="false">
<substitution>10.1.1.1</substitution>
</argument>
<argument streamed="false">
<substitution>10.1.1.2</substitution>
</argument>
<argument streamed="true">
<switch>-tm</switch>
</argument>
</command>
You can set the from address to be anyting you want (replace the "opennms@mycompany.com" string) and the IP addresses should point to your main and backup SMTP servers. If you only have one, put the same address in for both. Insure that those servers are configure to accept mail from the OpenNMS system.






