Webmin - Send monitoring notifications through gmail rather than local mail server
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)?
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.
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.
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.
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?
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:
Configure sendmail to have multiple smart hosts, and set up gmail as one of them (instructions: http://www.cyberciti.biz/tips/linux-...smarthost.html). Your shell script will then try the FIRST smart host (yours), then fail over to the second (Gmail).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.