From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 00BEF15808B for ; Fri, 27 Sep 2024 02:40:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C6EB72BC048; Fri, 27 Sep 2024 02:40:14 +0000 (UTC) Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 60F9B2BC014 for ; Fri, 27 Sep 2024 02:40:14 +0000 (UTC) Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1su0tx-00097Q-8l for gentoo-user@lists.gentoo.org; Fri, 27 Sep 2024 04:40:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Grant Edwards Subject: [gentoo-user] Re: Computer system email no not working since gmail change. Date: Fri, 27 Sep 2024 02:40:05 -0000 (UTC) Message-ID: References: <2284374.iZASKD2KPV@rogueboard> <61ae6f8b-c889-5c7d-1e4a-2ab493f9bfb6@gmail.com> <4624142.cEBGB3zze1@rogueboard> <7f24b60f-b7bd-1a3f-83ca-722f34dcfd65@gmail.com> <7e93df09-d3a9-0710-a9e1-796815d64b83@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: slrn/1.0.3 (Linux) X-Archives-Salt: eb30a963-7757-4c6a-997c-e3eda56abd69 X-Archives-Hash: b45c41e3ddfd8d1a57d1d520014a973b On 2024-09-27, Dale wrote: > It says port 465 but it is using Oauth2 if that matters. It doesn't. > I'll admit, the last time I got this working, I followed a guide and > it just worked.  Once it worked, I left it alone.  I was scared that > if I touched it, it would stop working.  LOL  > > I changed the config to port 465 and it still failed with this.  > > > Sep 26 19:04:26 Gentoo-1 smartd[18737]: Executing test of to root ... > Sep 26 19:04:36 Gentoo-1 msmtp[18815]: host=smtp.gmail.com tls=on > auth=off from=rdalek1967gmail.com recipients=root errormsg='the > server sent an empty reply' exitcode=EX_PROTOCOL According to that message, the msmtp auth option is off. It needs to be on. Look at the working configuraiton I posted. Use that configuration with your email address and app password. It also looks like smartd is trying to send mail to the recipient "root". That's not a valid destination when sending via most smtp servers. You need to be sending to a recipient that looks like "user@domain". What port number are you trying to use? Please re-read what I wrote about port numbers and starttls. If you're using port 465, you need to turn tls_starttls OFF. If you're using port 587, tls_starttls needs to be ON. That's the default, but I recommend turning it on explicitly. My advice: don't use smartd to try to get msmtp working. Use something easier to work with. The usual way to do it is using something like mailx. The Arch wiki page is an excellent resource: https://wiki.archlinux.org/title/Msmtp It shows how to test msmtp using mailx. It also addresses the error you're seeing explicitly: 8.2 Server sent empty reply If you get a "server sent empty reply" error, this probably means the mail server does not support STARTTLS over port 587, but requires TLS over port 465. Note that some systems will ignore a message without a Message-Id: header, so the example from the Arch page that cats a message from a file to msmtp might not work reliably.