unable to sent thold Alert Mail

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
petercheunghk
Posts: 3
Joined: Wed Jan 16, 2019 4:17 am

unable to sent thold Alert Mail

#1 Post by petercheunghk » Fri Jan 18, 2019 5:08 am

Test Email Results
Checking Configuration...
Method: SMTP
Creating Message Text...

This is a test message generated from Cacti. This message was sent to test the configuration of your Mail Settings.

Your email settings are currently set as follows

Method: SMTP
Device: smtp.office365.com
Port: 25
Authentication: true
Username: [email protected]
Password: (Not Shown for Security Reasons)
Security: tls
Ping Results: Bypassed


Sending Message...

Success!
The Text.Mail setting is ok


But the unable to sent thold Alert Mail
2019/01/18 15:15:07 - THOLD ERROR: Sending Email Failed. Error was Invalid address: (From): [email protected]
2019/01/18 15:15:07 - MAILER ERROR: Invalid address: (From): [email protected]




Cacti Ver: 1.2.0

User avatar
camerabob
Cacti User
Posts: 275
Joined: Fri Feb 10, 2017 2:45 pm
Location: Long Island, New York, USA
Contact:

Re: unable to sent thold Alert Mail

#2 Post by camerabob » Fri Jan 18, 2019 6:56 am

Try changing the sender email to the same one you used in the test email. It may be a mail server issue, rejecting the sender domain name.
See the Cacti 1.x templates I use at: http://www.camerabob.com/cacti

Live: Cacti 1.2.3 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Test: Cacti 1.2.4 @ CentOS 7-6.1810.2.el7 & PHP 5.4.16-46.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: unable to sent thold Alert Mail

#3 Post by netniV » Sun Jan 20, 2019 5:45 am

Office 365 will definitely not allow you send as Localhost. You need to properly define the systems sender address.

petercheunghk
Posts: 3
Joined: Wed Jan 16, 2019 4:17 am

Re: unable to sent thold Alert Mail

#4 Post by petercheunghk » Sun Jan 20, 2019 8:07 pm

netniV wrote:Office 365 will definitely not allow you send as Localhost. You need to properly define the systems sender address.

May i know how to define?

i haven't config postfix ?

petercheunghk
Posts: 3
Joined: Wed Jan 16, 2019 4:17 am

Re: unable to sent thold Alert Mail

#5 Post by petercheunghk » Mon Jan 21, 2019 3:10 am

Edit thold_functions.php

Code: Select all

		if ($from_email == '') {
			if (isset($_SERVER['HOSTNAME'])) {
				$from_email = '[email protected]' . $_SERVER['HOSTNAME'];
			} else {
				$from_email = '[email protected]';
			}
		}
Fix

netniV
Cacti Guru User
Posts: 2670
Joined: Sun Aug 27, 2017 12:05 am

Re: unable to sent thold Alert Mail

#6 Post by netniV » Mon Jan 21, 2019 5:26 am

If you are going to hard code it, there's not point having any of the IF statements. But there is a setting where that should be defined under Configuration -> Settings -> Thresholds (I think it is - not in front of my cacti install right now).

Post Reply