one new problem...

Support questions about the Threshold plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
lyon66
Posts: 5
Joined: Thu Jul 04, 2019 7:18 am

one new problem...

#1 Post by lyon66 » Fri Jul 05, 2019 4:43 am

2019/07/05 17:39:03 - SYSTEM STATS: Time:1.2312 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:6 RRDsProcessed:4
2019/07/05 17:39:03 - THOLD ERROR: Sending Email Failed. Error was The following From address failed: [email protected] : MAIL FROM command failed,2ee45d1f1ab7213-3c4bd Invalid Sender
,550,SMTP server error: MAIL FROM command failed Detail: 2ee45d1f1ab7213-3c4bd Invalid Sender
SMTP code: 550SMTP server error: MAIL FROM command failed Detail: 2ee45d1f1ab7213-3c4bd Invalid Sender
SMTP code: 550

How to figure this out? Thanks a lot!

cacti 1.1.19
thold 1.0.3

cigamit
Developer
Posts: 2818
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: one new problem...

#2 Post by cigamit » Fri Jul 05, 2019 8:44 am

Did you go into Settings >> Alerting / Thold and configure a Sender? There are also a few places to configure under Settings >> Mail/Reporting/DNS

lyon66
Posts: 5
Joined: Thu Jul 04, 2019 7:18 am

Re: one new problem...

#3 Post by lyon66 » Sun Jul 07, 2019 8:02 pm

cigamit wrote:Did you go into Settings >> Alerting / Thold and configure a Sender? There are also a few places to configure under Settings >> Mail/Reporting/DNS
I've set up both places, but I still can't send alarm mail.

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

Re: one new problem...

#4 Post by netniV » Mon Jul 08, 2019 6:38 am

Do you see any entries in the cacti log as to why? If there are missing details, you should see a reason there. Otherwise, are you sure its being triggered?

hipsterdoofus
Cacti User
Posts: 83
Joined: Fri Mar 09, 2007 12:35 pm

Re: one new problem...

#5 Post by hipsterdoofus » Fri Jan 03, 2020 1:39 pm

Sorry for dredging up a semi-old problem, but I did not see an answer and am experiencing the same problem. I am running Cacti 1.2.8 on CentOS. This is a just updated install. I am running thold 1.3.2. In both the main settings as well as the thold settings, the from address is set correctly and is identical to each other. When I send a test email, it sends correctly, however, if I look under clog, it says:

2020/01/03 12:10:32 - THOLD ERROR: Sending Email Failed. Error was Invalid address: (From): [email protected]

So from what I can tell, it seems that thold_functions.php is not pulling the $from_email, but that doesn't make sense as I would think a lot of people would be having issues. Any suggestions?

cigamit
Developer
Posts: 2818
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: one new problem...

#6 Post by cigamit » Fri Jan 03, 2020 1:53 pm

Relevant code is at
https://github.com/Cacti/plugin_thold/b ... .php#L5266

If it as passed a $from_email (We generally don't pass one) to the function, it will use it.

Code: Select all

function thold_mail($to_email, $from_email, $subject, $message, $filename, $headers = array()) {
If not, it will check the thold setting.

Code: Select all

		$from_email = read_config_option('thold_from_email');
If the thold setting is blank, then it tries to figure out the server name and if it not, it just appends localhost

Code: Select all

			if (isset($_SERVER['HOSTNAME'])) {
				$from_email = '[email protected]' . $_SERVER['HOSTNAME'];
			} else {
				$from_email = '[email protected]';
			}
So long story short, make sure the "Settings >> Alerting/Thold >> From Email Address" is set

Screenshot_1.jpg
Screenshot_1.jpg (19.02 KiB) Viewed 109 times

hipsterdoofus
Cacti User
Posts: 83
Joined: Fri Mar 09, 2007 12:35 pm

Re: one new problem...

#7 Post by hipsterdoofus » Fri Jan 03, 2020 2:27 pm

cigamit wrote:
Fri Jan 03, 2020 1:53 pm
Relevant code is at
https://github.com/Cacti/plugin_thold/b ... .php#L5266

If it as passed a $from_email (We generally don't pass one) to the function, it will use it.

Code: Select all

function thold_mail($to_email, $from_email, $subject, $message, $filename, $headers = array()) {
If not, it will check the thold setting.

Code: Select all

		$from_email = read_config_option('thold_from_email');
If the thold setting is blank, then it tries to figure out the server name and if it not, it just appends localhost

Code: Select all

			if (isset($_SERVER['HOSTNAME'])) {
				$from_email = '[email protected]' . $_SERVER['HOSTNAME'];
			} else {
				$from_email = '[email protected]';
			}
So long story short, make sure the "Settings >> Alerting/Thold >> From Email Address" is set


Screenshot_1.jpg

Yes, that's what is strange about this. My thold from email address is set the same as the global one. Test emails from the global setting page work, but thold seems to think that the from email address is blank then?
chrome_2020-01-03_13-22-27.png
chrome_2020-01-03_13-22-27.png (4.54 KiB) Viewed 106 times

cigamit
Developer
Posts: 2818
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: one new problem...

#8 Post by cigamit » Fri Jan 03, 2020 2:33 pm

Ya, I would double check the mysql table "settings" first to verify it actually is set in there.

Did you also click Save on the Thold Settings page? As the value it shows actually defaults to what is set for "settings_from_email". If you don't click Save on it, then it never actually sets that though, and thold doesn't use it.

https://github.com/Cacti/plugin_thold/b ... s.php#L453

hipsterdoofus
Cacti User
Posts: 83
Joined: Fri Mar 09, 2007 12:35 pm

Re: one new problem...

#9 Post by hipsterdoofus » Fri Jan 03, 2020 3:03 pm

cigamit wrote:
Fri Jan 03, 2020 2:33 pm
Ya, I would double check the mysql table "settings" first to verify it actually is set in there.

Did you also click Save on the Thold Settings page? As the value it shows actually defaults to what is set for "settings_from_email". If you don't click Save on it, then it never actually sets that though, and thold doesn't use it.

https://github.com/Cacti/plugin_thold/b ... s.php#L453
Thank you! I believe it was my settings table that was messed up when I upgraded (or tried) to update everything. Just got a thold email.

Post Reply