LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Webmin - Send monitoring notifications through gmail rather than local mail server (https://www.linuxquestions.org/questions/linux-server-73/webmin-send-monitoring-notifications-through-gmail-rather-than-local-mail-server-930505/)

adenicol 02-21-2012 09:18 AM

Webmin - Send monitoring notifications through gmail rather than local mail server
 
Hi,

I have webmin set up to monitor several services on my server, including sendmail. This past weekend sendmail went down and I didn't find out about it until Monday because webmin had no way of sending me notifications.

I see on the "webmin->System and Server Status->Service Monitoring" page there is the option of using an external smtp server instead of the local mail server for sending out email notifications. Does anyone know how I can configure this to authenticate and send alerts through gmail (or hotmail, yahoo, or any other free email service)?

Thanks!
Anthony

TB0ne 02-21-2012 10:27 AM

Quote:

Originally Posted by adenicol (Post 4608248)
Hi,
I have webmin set up to monitor several services on my server, including sendmail. This past weekend sendmail went down and I didn't find out about it until Monday because webmin had no way of sending me notifications.

I see on the "webmin->System and Server Status->Service Monitoring" page there is the option of using an external smtp server instead of the local mail server for sending out email notifications. Does anyone know how I can configure this to authenticate and send alerts through gmail (or hotmail, yahoo, or any other free email service)?

Well, I think you're trapped, personally, and I've been there before too. :) If sendmail goes down...that's your link to the outside world for email...so if it goes down, it can't notify you, because email is down. You may be able to use something like sendemail (http://caspian.dotconf.net/menu/Software/SendEmail/), which doesn't require an MTA like postfix/sendmail to work.

I haven't played with Webmin in a while, but there are how-to docs for both gmail and yahoo on how to configure them to be an MTA (for Google, for example: http://lifehacker.com/111166/how-to-...ur-smtp-server). The downside is that you'll have to open a channel to the Internet for SMTP access, to use it.

adenicol 02-21-2012 10:32 AM

I have seen some of the how-to guides. I don't want to use Google as the backend for all my server emails as I have client websites on the box and would rather they go our through the box itself. It's only the administrative notifications I want going out.

TB0ne 02-22-2012 08:51 AM

Quote:

Originally Posted by adenicol (Post 4608304)
I have seen some of the how-to guides. I don't want to use Google as the backend for all my server emails as I have client websites on the box and would rather they go our through the box itself. It's only the administrative notifications I want going out.

Well, you've got two choices. First is go into Webmin, and tell *IT* to use Gmail as the outgoing notification server. The only pieces of mail that will use gmail smtp would be webmin alerts.

The only other option (and the one I'd probably use, too), is look at the SMTP check script. If sendmail is down, you could try to restart it and sleep for a few minutes, then check again. If it's still down, send an outgoing alert via the gmail smtp server.

adenicol 02-22-2012 09:06 AM

Hi Tbone,

Both of those sound like great ideas...I actually have it try to restart sendmail already when it goes down but it didn't come back up last week.

Where in Webmin would I tell it to use Gmail to send the reminders? The only thing I could find thus far is for it to use an external SMTP server to send emails, but it doesn't give me the option to set up any sort of authentication for that (ex: gmail username and password). Is there somewhere else I need to be looking to set that information up?

Thanks!

TB0ne 02-22-2012 10:20 AM

Quote:

Originally Posted by adenicol (Post 4609211)
Hi Tbone,

Both of those sound like great ideas...I actually have it try to restart sendmail already when it goes down but it didn't come back up last week.

Where in Webmin would I tell it to use Gmail to send the reminders? The only thing I could find thus far is for it to use an external SMTP server to send emails, but it doesn't give me the option to set up any sort of authentication for that (ex: gmail username and password). Is there somewhere else I need to be looking to set that information up?
Thanks!

I'm not exactly sure...like I said, I'm not too familiar with webmin, since I don't use it anymore. It's not a bad thing, but in my opinion, it leaves a vulnerability open to your server, and doesn't give you the fine control you have over configuring services manually.

You have a few options:

adenicol 02-22-2012 10:39 AM

I have to much mail coming from clients websites on the server to have everything go through gmail. Let me research the smarthost and see if I can get that to work for me along with sendmail.

TB0ne 02-22-2012 11:49 AM

Quote:

Originally Posted by adenicol (Post 4609291)
I have to much mail coming from clients websites on the server to have everything go through gmail. Let me research the smarthost and see if I can get that to work for me along with sendmail.

Like I said, you can specify MULTIPLE smarthosts. Your initial configuration remains UNCHANGED, but you ADD a server. If the first fails, it goes to the second.

Again, if sendmail is down, you won't be able to send mail, which is why I suggested the sendemail and/or ssmtp programs, which DO NOT NEED IT.


All times are GMT -5. The time now is 12:12 PM.