Get the App
SLTechnology News&Howtos  ›  Servers  › 

Cacti sendmail sends alarm email

Shulou Source: shulou.com Published: 2022-06-02 05:41:39 11月16日 Update

Objective: to accept abnormal alarm email

Cacti uses the built-in sendmail plug-in to send email. as the first step, we need to confirm whether the plug-in exists and whether it works properly.

Generally, cacti is installed with a built-in sendmail plug-in, of course, we can also install it ourselves.

1. Find sendmail

[root@localhost sendEmail-v1.56] # find /-name sendmail

Etc/selinux/targeted/active/modules/100/sendmail

/ usr/sbin/sendmail / this is the path where sendmail is located.

/ usr/lib/sendmail

This is no problem, you can use it, if there is no sendmail plug-in, we can install it ourselves.

2. Download the sendmail plug-in

[root@localhost /] # wget http://caspian.dotconf.net/menu/Software/SendEmail/sendEmail-v1.56.tar.gz

2.1. Decompress:

[root@localhost /] # tar-zxvf sendEmail-v1.56.tar.gz

2.2. Enter the decompressed directory and copy the sendmail file to / usr/local/bin/sendEmail

[root@localhost /] # cd sendEmail-v1.56

[root@localhost /] # cp sendEmail / usr/local/bin

2.3. Modify the current permissions, modify user groups:,

[root@localhost /] # chmod 775 / usr/local/bin/sendEmail

[root@localhost /] # chown cacti:cacti / usr/local/bin/sendEmail

2.4. Test sending email

[root@localhost /] # / usr/local/bin/sendEmail-f send mailbox-t receive mailbox-s sending server-u mail subject-xu send email name-xp send email password-m email content

Dec 18 13:52:19 localhost sendEmail [25568]: Email was sent successfully!

2.5. If the test is successful, set the corresponding options in cacti.

2.6. After setting up, test sending email

2.7. OK, no problem. The email was sent successfully. Set the alarm type according to your individual situation.

Tags: Mail plugin test success mailbox question personal subject content password that is situation location copy file server permissions user user group directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Huawei OPPO Reno NVidia Linux