monit syntax error on SSL - monit

I am trying to use gmail as my mail server for alert messages in monit. I have these lines in monitrc:
set mailserver smtp.gmail.com
port 587
username "myusername" password "mypassword"
using SSL
I always get the following error.
/etc/monit/monitrc:59: Error: syntax error 'SSL'
I am using monit 5.6 and I copied the recipe from https://mmonit.com/wiki/Monit/Gmail

This works fine with monit 5.20.

It's probably a bug, i had it on version 5.2.5 (Centos 7 on Amazon Linux)
Please use the latest version (as of now 5.21.0) and it will work, as adviesd by the recipe.

Related

cURL and SMTP error after SSL and clodflare

I have a wordpress site.Everything was running fine but after I activated SSL sertificate and Cloudflare things got messed up.
I am trying to send emails via mailgun smtp. but I got this error.
smtp error
I googled for this one and I tried to change from google DNS to openDNS but no success
Also when I want to install a plugin these errors shows up
install error
However I can upload plugins manually so it should not be a permission issue.
I am running Nginx and here are my iptables
iptables
And to check ports Listening
Listen
Since this is curl error I tried to run:
curl -v https://mydomain.info
In a perfect world it should return html but I got this instead:
curl: (6) Could not resolve host: mydomain.info
If anyone has any idea where to look for answers I would really appreciate that.

How do I use SMTP on a test development server?

I am building an ecommerce website on a local Windows 7 pro (Apache/php) test server with a self-signed SSL. I have the mydomain.com in the hosts file redirecting to localhost - so far so good.
When I try to use the email function of the ecommerce software via Gmail smtp, I am getting an SSL error:
[23-Apr-2018 03:00:06 America/New_York] Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\Apache24\htdocs\includes\classes\vendors\PHPMailer\class.smtp.php line 379]
[23-Apr-2018 03:00:06 America/New_York] SMTP Error: Could not connect to SMTP host.
[23-Apr-2018 03:00:06 America/New_York] CLIENT -> SERVER: QUIT
I thought about just getting a cheap CA SSL and installing it on the server but I'm not sure this will work, since the Gmail smtp server is obviously not using my hosts file. This is just a guess at this point.
Question I'd like answered is, 1, will installing CA cert resolve the issue, and 2. if not, what is your strategy to have a functional email on a test server with domain in hosts file?
Thank you,
David
I added the following to the function responsible for smtp connection. Warning, only to be used on completely secure environment, your own test server, never on a live server.
$options["ssl"]=array("verify_peer"=>false,"verify_peer_name"=>false,"allow_self_signed"=>true);

Fix SSL negotiation failed

I installed : "cpan isntall Crypt::SSLeay" So the error from "fs.cgi: ERROR 500 SSL negotiation failed:" Changed to "
failed while requesting fs.cgi: SSL negotiation failed: at /usr/local/share/perl5/LWP/Protocol/http.pm line 25 at /usr/local/share/perl5/LWP/Protocol/http.pm line 25
"
How to fix this? I searched this forum but the issue is still there. I have two servers first server is accessing the server 2, both have different ssl certificates.
Apache on CentOS 6. Please explain the solution properly.
This issue was fixed by opening port 443 on both servers.
This error occurs due to problem in SSL. Some SSL certificates won't be enabled to cover the emails. Or in your server the devocot or imap was not installed to connect SSL. I experience the same problem and its fixed by simply turning off the SSL or make it to TLS to connect the email it fixed. May be this solution help someone in future

CURL SSL Connect Error during install of Sitelock on Centos 6 server

I am trying to install Sitelock with Plesk 11 on my GoDaddy Centos 6.4 VPS. When I access Sitelock 1.0 through the Applications tab and click the install button I get this error:
Error: Installation of Sitelock failed. Non-zero exit status returned
by script. Output stream: 'CURL error. API request failed with
message:SSL connect error '.
Google does not return a result for this exact error message and none that I can find sound specifically related. I am not familiar with cURL. Digicert indicates the SSL is correctly installed and COMODO SSL Analyzer doesn't indicate any problems. How can I resolve this?

sending email with PHP sendmail not working for primary domain

example.com has a web server and a mail server.
Email sent from the web server to any email address (except #example.com) works.
Email sent to #example.com works from any other source.
Web server is setup to use webmail. The web server is Ubuntu 12.04 with Apache and PHP
Any help appreciated. Thanks.
=== edit
This fixed the problem, thanks
https://serverfault.com/questions/65365/disable-local-delivery-in-sendmail/128450#128450
Apache was trying to handle the email locally on our server. When I looked at the log response I saw it was returning the following error.
User unknown
550 5.1.1 recepient#example.com
After following these steps the email was routed to the correct mail server. My setup is Ubuntu 12.04 with PHP 5 Apache2 and Sendmail.
Edit the sendmail config file on the Apache server:
sudo nano /etc/mail/sendmail.mc
At the end of the file add the following lines of code to handle email correctly:
define(`MAIL_HUB', `example.com.')dnl define(`LOCAL_RELAY',
`example.com.')dnl
Save the file and exit.
Update the sendmail setup in the command prompt:
sudo sendmailconfig
Follow the steps, I said yes to everything
Restart sendmail:
sudo service sendmail restart
Try sending the email again. It should work now.