[SOLVED] Difficulty Configuring OSSEC to Send Email Notifications Through GMail SMTP
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Why are you configuring ossec to use localhost? Do you have a mail server configured? As you've configured ssmtp, it's not a mail server but just a connector to gmail, as I understand it.
Can you configure ossec to use ssmtp? If not try configuring ossec to use gmail directly, as you've done for ssmtp.
Thanks for the response. I was configuring OSSEC to use localhost because, according to the article/tutorial I was following:
"Local postfix will redirect all delivery requests to gmail user set in SSMTP."
This may be incorrect, but I am not familar enough with either Postfix or sSMTP to say for certain one way or another.
Unfortunately, I do not see how I would configure OSSEC to use GMail directly, since I see no way to specify necessary options such as port, credentials, etc. According to my understanding of the OSSEC documentation, there are only a handful of options relevant to email - smtp_server, email_to, email_from, etc.
While I have some familiarity with e-mail protocols, I have never set-up a full SMTP server on a system. If my current sSMTP configuration is not capable of performing the task of forwarding OSSEC's request to GMail, is there some sSMTP configuration that can be performed, or must a different MTA package/utility be used?
Thanks for the response. I was configuring OSSEC to use localhost because, according to the article/tutorial I was following:
"Local postfix will redirect all delivery requests to gmail user set in SSMTP."
This may be incorrect, but I am not familar enough with either Postfix or sSMTP to say for certain one way or another.
That's probably correct, but, apparently, you are not running postfix, or any MTA (Mail Transport Agent) as sendmail, qmail, dovecot, etc.
Reading the how-to about OSSEC on digitalocean.com I find.
Quote:
Optional: If you want to send mail from a local SMTP server, you should install Postfix for simple email sending
I actually do have Postfix installed and running; it was installed with the system. I just never touched any of the configuration files. I am guessing I have to configure Postfix itself; configuring the sSMTP package is not sufficient even though I can send email through the command line? Sorry, for the stupid question; I am a bit unclear on the relationship between Postfix and sSMTP. The article I was following explained how to configure sSMTP, but only referenced installing (not detailing the configuration of) Postfix.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.