unable to sent thold Alert Mail

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

Moderators: Developers, Moderators

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

unable to sent thold Alert Mail

Post by petercheunghk »

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: demo@idemo.com
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): Cacti@localhost
2019/01/18 15:15:07 - MAILER ERROR: Invalid address: (From): Cacti@localhost




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

Re: unable to sent thold Alert Mail

Post by camerabob »

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.
Prod: Cacti 1.2.15 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Maint @ 1.2
Monitor @ 2.3.6
Thold @ 1.2.4

Temp: Cacti 1.2.3 @ CentOS Linux release 7.9.2009 (Core) & PHP 5.4.16-48.el7
Flowview @ 2.1
Mactrack @ 4.2
Maint @ 1.2
Monitor @ 2.3.6
Router Configs @ 1.3.4
Syslog Monitoring @ 2.1
Thold @ 1.2.4
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: unable to sent thold Alert Mail

Post by netniV »

Office 365 will definitely not allow you send as Localhost. You need to properly define the systems sender address.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
petercheunghk
Posts: 3
Joined: Wed Jan 16, 2019 4:17 am

Re: unable to sent thold Alert Mail

Post by petercheunghk »

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

Post by petercheunghk »

Edit thold_functions.php

Code: Select all

		if ($from_email == '') {
			if (isset($_SERVER['HOSTNAME'])) {
				$from_email = 'Cacti@' . $_SERVER['HOSTNAME'];
			} else {
				$from_email = 'xxxx@xxxx.com';
			}
		}
Fix
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: unable to sent thold Alert Mail

Post by netniV »

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).
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests