On 2024-09-26, Dale <rdalek1...@gmail.com> wrote:

> I removed ssmtp and installed msmtp. I think I got the config set up
> but it is different so I may not have it right. It doesn't work tho.
> From messages.
>
>
> Sep 26 10:03:33 Gentoo-1 smartd[27728]: Executing test of <mail> to root ...
> Sep 26 10:05:40 Gentoo-1 msmtp[30861]: host=smtp.gmail.com tls=on
> auth=off from=rdalek1967<at>gmail.com recipients=root errormsg='cannot
> connect to smtp.gmail.com, port 587: Connection timed out'
> exitcode=EX_TEMPFAIL

It looks like your network is broken. Try this:

    $ telnet smtp.gmail.com 587
    Trying 209.85.145.109...
    Connected to smtp.gmail.com.
    Escape character is '^]'.
    220 smtp.gmail.com ESMTP 8926c6da1cb9f-4d888860978sm58959173.69 - gsmtp

Note: Port 587 is for plaintext connection and then shifting into TLS
mode with the starttls command.  When configuring msmtp:

    port 587
    tls on
    tls-starttls on
or
    port 465
    tls on
    tls-starttls off

Port 465 starts using TLS immediately

    $ openssl s_client -connect smtp.gmail.com:465
    CONNECTED(00000003)
    depth=2 C = US, O = Google Trust Services LLC, CN = GTS Root R1
    verify return:1
    depth=1 C = US, O = Google Trust Services, CN = WR2
    verify return:1
    depth=0 CN = smtp.gmail.com
    verify return:1
    ---
    Certificate chain
     0 s:CN = smtp.gmail.com
       i:C = US, O = Google Trust Services, CN = WR2
       a:PKEY: id-ecPublicKey, 256 (bit); sigalg: RSA-SHA256
       v:NotBefore: Aug 26 07:12:09 2024 GMT; NotAfter: Nov 18 07:12:08 2024 GMT
    [...]       
    ---
    read R BLOCK
    220 smtp.gmail.com ESMTP e9e14a558f8ab-3a344d9250esm496675ab.41 - gsmtp
    
    


Reply via email to