Welcome to Pandora FMS Community › Forums › Community support › Advanced troubleshooting › Attemtping to get gmail email server working with pandora
-
Attemtping to get gmail email server working with pandora
Posted by opike on August 3, 2011 at 23:00I had originally opened a thread for this issue back in January:
http://openideas.info/smf/index.php/topic,2438.0.html
but it’s been over 120 days since a reply has been made on that thread so the forum software suggested I open a new thread. I was getting by with a different mail server since January but I no longer have access to that server so now I’m back to trying to use the gmail smtp server, with which I’m still having issues.Regardless of what configuration I try, I get the following error message in /var/log/pandora/pandora_server.log:
2011-08-03 10:49:23 ubuntu [V1] [ERROR] Sending email to [email protected] with subject [PANDORA] Alert from agent ubuntu on module perl ping hpdekstopHere is how I think the mail server settings should be set up in pandora_server.conf:
mta_address smtp.gmail.com # mta_port: MTA port (default 25) mta_port 587 # mta_user MTA User (if needed for auth, FQD or simple user, depending on your server) mta_user hastapasta99 # mta_pass MTA Pass (if needed for auth) mta_pass xxxxxxxx # mta_auth MTA Auth system (if needed, support: LOGIN, PLAIN, CRAM-MD5, DIGEST-MD) mta_auth LOGIN
I tried all of the Auth system options but I still get the same error.
I have a java program that successfully uses the same gmail server for sending emails. Here’s part of the java code:
String username = "hastapasta99"; String password = "xxxxxxx"; Properties props = new Properties(); props.put("mail.smtp.port","587"); props.put("mail.smtp.host", "smtp.gmail.com"); props.put("mail.smtp.auth", "true"); props.put("mail.smtp.starttls.enable", "true"); props.put("mail.debug", "false"); Â /* * Setting these timeout values since sending mail sometimes hangs. */ props.put("mail.smtp.timeout", 60000); props.put("mail.smtp.connectiontimeout", 60000); //Session session = Session.getInstance(props); Session session = Session.getInstance(props,new MyPasswordAuthenticator(username, password));
I’m able to successfully telnet to smtp.gmail.com on port 587 from the box running pandora server so it’s not a network connection or firewall issue (I have the firewall completely disabled).
I’m using pandora FMS version 3.2 on ubuntu.
sfks replied 11 years, 7 months ago 12 Members · 12 Replies -
12 Replies
-
::
Greetings.
I had originally opened a thread for this issue back in January:
http://openideas.info/smf/index.php/topic,2438.0.html
but it’s been over 120 days since a reply has been made on that thread so the forum software suggested I open a new thread.My deepest regrets for that awful delay then. 😉
This kind of threads are starting to get on my nerves (not cause of you :P) because you’re not the first one, and I doubt you’ll be the last one who reports about this “external mta problem”.
This is because I’m having a bad time trying to find out where’s the problem in your case, because our team has already installed some Pandoras in our clients’ machines using external mta configurations in pandora_server.conf without any problems.
I’ll keep searching about it and will get back to you ASAP.
-
-
-
::
Hello,
This is how I have configured PandoraFMS to work with gmail (on Ubuntu):
Modify Pandora config file.
You can do this by executing the command:
sudo nano /etc/pandora/pandora_server.confSetup the mail settings:
Because we have installed a local SMTP server, we only need to set up the connection to this mail server:# mta_address: External Mailer (MTA) IP Address to be used by Pandora FMS internal email capabilities
mta_address localhost# mta_port: MTA port (default 25)
#mta_port# mta_user MTA User (if needed for auth, FQD or simple user, depending on your server)
#mta_user# mta_pass MTA Pass (if needed for auth)
#mta_pass# mta_auth MTA Auth system (if needed, support: LOGIN, PLAIN, CRAM-MD5, DIGEST-MD)
#mta_auth# mta_from Email address that sends the mail, by default is pandora@localhost
#Â Â Â Â Â probably you need to change it to avoid problems with your antispam
mta_from Network Monitor AdministratorConfigure local mailserver EXIM4
http://wiki.debian.org/GmailAndExim4
Apply a filter, so the mails come from [email protected]
Create a file by executing the command:
sudo nano /etc/exim4/filter_reply_to
with the following content:
# Exim filter# Rewrite my reply to for any mail sent to [email protected]
if
    $header_from: contains “Network Monitor Administrator”
then
    headers remove “Reply-To”
    headers add “Reply-To: [email protected]”
    headers add “From: [email protected]”
endif# Forward any mail sent to root
if
    $header_to: contains “root”
then
    headers remove “Reply-To”
    headers add “Reply-To: [email protected]”
    headers remove “To”
    headers add “To: [email protected]”
    deliver “[email protected]”
endifAdjust also the exim4 config file:
sudo nano /etc/exim4/exim4.conf.template
Add here the line
system_filter = /etc/exim4/filter_reply_to
And restart now the mail service:
sudo service exim4 restartIf you have problems with sending mails, you can check the logs:
sudo tail /var/log/mail.logGreetings,
Geert
-
::
Hi,
What happens if you run: echo “body test” | mail -s “test” [email protected]
Do you get the email?
-
-
-
-
::
If I am understanding this tread, Pandora does not support TLS for SMTP without third party intervention.
Is this correct? If so are there plans to correct this issue?
I like the system but email alerts are the heart of my effort.
Pandora supports any kind of SMTP auth since 4.0, in 3.2.1 depends on sendmail library of your system, since 4.0 comes with its own library to avoid that problem. If doesnt work, just check your setup in pandora_server.conf.
-
::
Pandora supports any kind of SMTP auth since 4.0, in 3.2.1 depends on sendmail library of your system, since 4.0 comes with its own library to avoid that problem. If doesnt work, just check your setup in pandora_server.conf.
Dear Sancho,
I’m using Pandora FMS 4.0.3, trying to configure mta through gmail (not with postfix), with no luck.
If it supports any kind of SMTP auth, would you please give us a configuration example for gmail smtp server?
I’ve tried:
mta_address smtp.gmail.com mta_port 587 mta_user [email protected] mta_pass XXXX mta_auth LOGIN mta_from Pandora FMS
mta_address smtp.gmail.com mta_port 587 mta_user [email protected] mta_pass XXXX mta_auth SSL mta_from Pandora FMS
mta_address smtp.gmail.com mta_port 587 mta_user [email protected] mta_pass XXXX mta_auth TLS mta_from Pandora FMS
And I always receive this in the log file:
2013-06-13 12:27:43 vmPandora [V1] [ERROR] Sending email to [email protected] with subject …..
Two days around this issue, and nothing. Please help me.
Thanks in advance.
-
::
Hello!!
Check this link:
http://www.openideas.info/wiki/index.php?title=Pandora:Configuration_emails_alertsRegards
-
::
Check this link:
http://www.openideas.info/wiki/index.php?title=Pandora:Configuration_emails_alertsThank you Mario. I had already checked before. It explains how to do it, but using postfix.
If, as Sancho says, Pandora is capable to send mails through any kind of smtp server, I would like to know how to make it work with gmail smtp server. Using gmail or google apps is pretty usual in many organizations, and it would be great to have an example, since I can’t find any working and tested configuration of pandora_server.conf for this scenario, and, obviously, I could not find out by myself how to make it work.
Thanks in advance.
Regards,