On 7/2/2013 10:14 AM, Amir Reza Rahbaran wrote:
> Hi ,
> I am using monit version 5.5 on fedora 8. It sent alerts to my
> gmail successfully. I aimed it send alerts to my yahoo  as well as
> gmail. But it could not .
>
> Bellow I mentioned some details .
>
> ---------------------------------------------------------------------------------
> UNAME Output:
> ---------------------------------------------------------------------------------
> Linux SA 2.6.34.1 #64 SMP Mon Feb 27 16:24:03 EDT 2012 i686 i686
> i386 GNU/Linux
>
> ---------------------------------------------------------------------------------
> Yahoo smtp server  configurations are :
> ---------------------------------------------------------------------------------
> set mailserver smtp.mail.yahoo.com <http://smtp.mail.yahoo.com>
> port 587
>     username "myUser" password "myPass"
>     using tlsv1
> set alert [email protected] <mailto:[email protected]>    on {
> resource }

This is unlikely to work on port 587, since monit (AFAIK) won't send
STARTTLS to initiate the TLS session.
It might work without tlsv1 if the server supports non-encrypted
sessions.

>
> ---------------------------------------------------------------------------------
> Debug Output:
> ---------------------------------------------------------------------------------
> Resource limit succeeded notification is sent to [email protected]
> <mailto:[email protected]>
> Sendmail error: 500 5.5.1 Invalid command

Trying to talk TLS to a plaintext session.

>
>
> I telnet on both smtp server and I found some differences :
>
> ------------------------------------------------------
> >> telnet smtp.mail.yahoo.com <http://smtp.mail.yahoo.com> 587
> ------------------------------------------------------
> Trying 98.138.105.21...
> Connected to smtp.mail.yahoo.com <http://smtp.mail.yahoo.com>.
> Escape character is '^]'.
> 220 smtp.mail.yahoo.com <http://smtp.mail.yahoo.com> ESMTP ready
> ehlo this.is.len
> 250-smtp.mail.yahoo.com <http://250-smtp.mail.yahoo.com>
> 250-PIPELINING
> 250-SIZE 41697280
> 250-8 BITMIME
> 250 AUTH PLAIN LOGIN XYMCOOKIE
> Connection closed by foreign host.

OK, this will probably work without the tlsv1 tag.

>
> -------------------------------------------------------
> >> telnet smtp.googlemail.com <http://smtp.googlemail.com> 587
> -------------------------------------------------------
> Trying 173.194.66.16...
> Connected to smtp.googlemail.com <http://smtp.googlemail.com>.
> Escape character is '^]'.
> 220 mx.google.com <http://mx.google.com> ESMTP s19sm22726510wik.11
> - gsmtp
> ehlo this.is.len
> 250-mx.google.com <http://250-mx.google.com> at your service,
> [95.82.38.214]
> 250-SIZE 35882577
> 250-8BITMIME
> 250-STARTTLS
> 250 ENHANCEDSTATUSCODES
> quit

I think google requires STARTTLS before AUTH, so can't use this port
with monit.

>
> -------------------------------------------------------------------------
> I tried an other port with following configurations.
> -------------------------------------------------------------------------
> set mailserver smtp.mail.yahoo.com <http://smtp.mail.yahoo.com>
> port 465
>     username "myUser" password "myPass"
>     using tlsv1
> set alert [email protected] <mailto:[email protected]>    on {
> resource }
>
> -----------------------------------------------------------------------
> I run it at debug mode and the outputs are:
> -----------------------------------------------------------------------
> Resource limit succeeded notification is sent to [email protected]
> <mailto:[email protected]>
> Sendmail: error receiving data from the mailserver
> 'smtp.mail.yahoo.com <http://smtp.mail.yahoo.com>' -- Resource
> temporarily unavailable

Looks as if Yahoo declined the mail from your IP address.  Maybe
they'll accept it later.  Monit appears to be working correctly.


>
>
> ----------------------------------------------------
> >> telnet smtp.mail.yahoo.com <http://smtp.mail.yahoo.com> 465
> ----------------------------------------------------
> Trying 98.139.211.125...
> Connected to smtp.mail.yahoo.com <http://smtp.mail.yahoo.com>.
> Escape character is '^]'.
> ehlo this.is.len
> Connection closed by foreign host.

You can't test a tls session with telnet.  Try openssl s_client
-connect smtp.mail.yahoo.com:465




  -- Noel Jones
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to