Can't send emails with cacti 0.8.7g

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

Moderators: Developers, Moderators

Post Reply
Nympheasi
Posts: 6
Joined: Sat Aug 21, 2010 11:06 pm

Can't send emails with cacti 0.8.7g

Post by Nympheasi »

Hi,

I'm using cacti 0.8.7g since last week and i'm not able to send email with it.

I installed the settings plugin and in the mail/dns section i tried to send mails via phpmail and it just don't work.
Checking Configuration...
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: PHP's Mailer Class





Sending Message...

ERROR: Unable to send email with php mail function, check your system logs
Unable to send email with php mail function, check your system logs
That's the error i got when using Send a Test Email functions...

Any ideas?

Thanks!
Last edited by Nympheasi on Sun Aug 22, 2010 8:28 am, edited 1 time in total.
Nympheasi
Posts: 6
Joined: Sat Aug 21, 2010 11:06 pm

Post by Nympheasi »

By the way, here's more infos about my cacti install:

OS: Ubuntu server 10.04
Cacti: 0.8.7g
Pugins: settings, thold

I installed sendmail in ubuntu and tried to send mail via sendmail in cacti but it still doesn't work...
Checking Configuration...
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: Sendmail
Sendmail Path: /usr/sbin/sendmail





Sending Message...

ERROR: DirectInject command output: 'Recipient names must be specified ' error: ''
DirectInject command output: 'Recipient names must be specified ' error: ''



Does someone has the same issue?

I really need to use the thold plugin with email notification but it seems harder to set than what i expected.

(By the way excuse my english, i do my best...)

Thanks.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post screenshot of "Settings" for the settings plugin (whoa, bad karma). Erase confidential data.
R.
Nympheasi
Posts: 6
Joined: Sat Aug 21, 2010 11:06 pm

Post by Nympheasi »

Do you mean the mail/dns tab in settings pages?
rujipars
Posts: 39
Joined: Fri Nov 02, 2007 11:25 am

Post by rujipars »

Make sure that you have 'sendmail' running and properly configured. By default PHPMail will use 'sendmail' to send e-mail.

For myself, I prefer SMTP Mail that will use SMTP server IP and username/password (if any) as configured in cacti setting.
Nympheasi
Posts: 6
Joined: Sat Aug 21, 2010 11:06 pm

Post by Nympheasi »

Thanks rujipars for your help.

I just tried with SMTP and seems i'm not lucky...

I tried with my isp smtp infos, i tried and without user/pass.

Here's the error:
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
Host: smtp.cgocable.ca
Port: 25
Authenication: false





Sending Message...

ERROR: Error returned by SMTP host: 220-Welcome to Cogeco Cable Inc. Messaging Environment.
Error returned by SMTP host: 220-Welcome to Cogeco Cable Inc. Messaging Environment.
Any ideas?
Nympheasi
Posts: 6
Joined: Sat Aug 21, 2010 11:06 pm

Post by Nympheasi »

I found a solution using php mail() function.

1. open /etc/mail/sendmail.mc
2. add the line: FEATURE(`nullclient', `smtp.your-isp.com')dnl
3. restart sendmail

Basically, nullclient will send all mail to a remote relay.

Hope it will help someone else...
rujipars
Posts: 39
Joined: Fri Nov 02, 2007 11:25 am

Post by rujipars »

If Nympheasi 's suggestion works you can go that way, it's fine.

If you just want to find out why SMTP does not work, try the following step.
The blue text is my input.

rujipars$ telnet mail.ji-net.com 25
Trying 203.147.0.5...
Connected to mail.ji-net.com.
Escape character is '^]'.
220 scan.ji-net.com ESMTP Sendmail 8.12.11.20060308/8.12.10; Wed, 25 Aug 2010 09:50:56 +0700
helo some-domain.com
250 scan.ji-net.com Hello [203.156.93.141], pleased to meet you
MAIL FROM: <sender@gmail.com>
250 2.1.0 <sender@gmail.com>... Sender ok
RCPT TO: <recipient@hotmail.com>
250 2.1.5 <recipient@hotmail.com>... Recipient ok
DATA
354 Enter mail, end with "." on a line by itself
Subject: Test using telnet

This is just a test to see if I can SMTP from my PC.
.

250 2.0.0 o7P2ou8w012123 Message accepted for delivery
quit
221 2.0.0 scan.ji-net.com closing connection
Connection closed by foreign host.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Nice how-to.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests