*nix Thread, Postfix and GMail as Relayhost Woes in Technical; Hello everyone,
It has been a while since I have posted on here but I could do with some help ...
15th March 2011, 12:40 PM #1
Postfix and GMail as Relayhost Woes
It has been a while since I have posted on here but I could do with some help as I am currently bashing my head against a desk trying to sort this out.
I have setup Nagios and RT on a Ubuntu 10.10 server and they are running quite nicely. However, the one (important) component I am missing is email integration so that the applications can send out e-mail alerts. This however, is totally new to me.
Annoyingly, our e-mail is currently hosted by RM (Easymail) so I need to set this up to work with either GMail or Easymail as a relayhost.
I have followed quite a few examples and tutorials on the web, but I have not managed to get any of them to work. Because I was unsure as to what configuration steps were failing, I have even tried using SSMTP to send a mail but even then I always get the error Cannot open smtp.gmail.com:587 Is this because I am behind the lancsngfl proxy or is the problem totally unrelated?
I could do with some help really on this as it would be great to get it working.
Thanks in advance,
Last edited by pshuttle; 15th March 2011 at 12:45 PM.
IDG Tech News
15th March 2011, 05:12 PM #2
I can see that the lack of replies illustrates either 1) Nobody else has any idea or 2) My lack of understanding of the issue is so severe I am better left alone!
15th March 2011, 05:37 PM #3
I've never done this but a quick google fnds this Monitor Network Services with Nagios - Part 1 (section 2.3) which looks like it describes what you're trying to do.
What I would expect to happen is that Nagios talks to a local SMTP server; that then uses normal DNS to find out where it should go to and delivers it.
For that to work, you need to allow port 25 outbound on your router so that the internal Postfix machine (or whatever) can connect to the external SMTP server which accepts mail for your domain.
If you can't do that (you don't control the router or port 25 is blocked outside your boundary) then I'm not sure what you can do but I hope someone else can help!
15th March 2011, 07:12 PM #4
ours basically works like this:
nagios.cnf emails a local (machine) admin:
posfix points to an upstream relay:
an aliases file fowards to whoever:
relayhost = x.x.x.x
nagios: itsupport@external mail.address.com
again, look for blocked ports etc
15th March 2011, 11:38 PM #5
The simplest way is to use stunnel on a machine that has permission to send outbound email.
I think the settings would be:
accept = 127.0.0.1:25
connect = smtp.gmail.com:465
If you google stunnel and gmail you'll find a lot of examples.
16th March 2011, 03:34 PM #6
Thanks for the replies guys. I will look into this when I get the chance.
Last Post: 9th January 2011, 12:14 AM
By LCPSWolf in forum *nix
Last Post: 22nd July 2010, 03:08 PM
Last Post: 8th October 2009, 05:29 PM
Last Post: 13th March 2008, 10:57 AM
By CyberNerd in forum *nix
Last Post: 16th February 2008, 03:28 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread