Grant Edwards wrote:
> On 2024-09-27, Dale <rdalek1...@gmail.com> 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 <mail> to root ...
>> Sep 26 19:04:36 Gentoo-1 msmtp[18815]: host=smtp.gmail.com tls=on
>> auth=off from=rdalek1967<at>gmail.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.
>
>
>
>


This is what I copied from yours, with obvious bits changed.  I'll put
"noneya" in those, so you know that isn't the real info. 


syslog LOG_MAIL

account    default
maildomain gmail.org
syslog on
from rdalek1967<noneya>gmail.com
host smtp.gmail.com
port 465
tls on
tls_certcheck off
tls_starttls off
auth on
user rdalek1...@gmail.com
password "noneya"  # That is the 16 character thing with spaces in it. 
I included quotes but I think you had them there too. 


I'm by no means a expert on this but I see 'auth on' in there.  I see
what you talking about in the error to tho.  As I mentioned in other
reply, I think something else is amiss somewhere.  If that config works
with gmail for you, it should work here. 

On the root thing, I have a alias set up in some file that tells it that
root is my gmail address.  It worked before but maybe not now.  File is
here:  /etc/mail/aliases  It has this info about root being my gmail
address. 


# Well-known aliases -- these should be filled in!
root: rdalek1...@gmail.com


My understanding, anything sent to root instead goes to my gmail
account.  I could be wrong on that.  o_O 

Is that what you have in yours?  If it is, it should work here.  If not,
my copy and paste is broken.  LOL  That aliases file make sense? 

Dale

:-)  :-) 

Reply via email to