Grant Edwards wrote:
> On 2024-09-27, Dale <rdalek1...@gmail.com> wrote:
>
>>>> 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.
>> 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. 
> That's not the config that msmtp is using.  See in the log where it
> says "auth=off"?  It should say "auth=on".  And I think it's also
> using the wrong port number (or you should turn tls_startls off).
>
> Here's what my log looks like:
>
>     Sep 26 15:57:47 aleph msmtp[21363]: host=smtp.gmail.com tls=on auth=on 
> user=grant.b.edwa...@gmail.com from=grant.b.edwa...@gmail.com 
> recipients=<deleted>@<deleted>.com mailsize=317 smtpstatus=250 smtpmsg='250 
> 2.0.0 OK  1727384267 e9e14a558f8ab-3a344d605d5sm1326875ab.7 - gsmtp' 
> exitcode=EX_OK
>

Well, that's where I put it.  I commented out all the other stuff and
pasted yours in, changed the needed bits and then tested it.  


>> 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. 
> msmtp is not using the configuration you showed above.
>
>> 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. 
> Msmtp doesn't read an alias file by default. You need to add an alias
> command to the msmtp config:
>
>     alias /etc/mail/aliases

OK.  I added that line to the config file.  Then it gives me this error. 


root@Gentoo-1 / # echo foo | msmtp -v bogus
msmtp: /etc/msmtprc: line 5: unknown command alias
root@Gentoo-1 / #




>
> Then run msmtp from the command line like this so you can see all the
> settings and the messages exchanged.  Pay particular attention to
> where it's reading the configuration from, port number, and
> tls_starttls.  Also look to see where it's reading aliases from.
>
>     $ echo foo | msmtp -v bogus
>     
>     msmtp: recipient address bogus not accepted by the server
>     msmtp: server message: 553-5.1.3 The recipient address <bogus> is not a 
> valid RFC 5321 address. For
>     msmtp: server message: 553-5.1.3 more information, go to
>     msmtp: server message: 553-5.1.3  
> https://support.google.com/a/answer/3221692 and review RFC 5321
>     msmtp: server message: 553 5.1.3 specifications. 
> 8926c6da1cb9f-4d8888f9f55sm483180173.166 - gsmtp
>     msmtp: could not send mail (account default from /etc/msmtprc)
>     loaded system configuration file /etc/msmtprc
>     ignoring user configuration file /home/grante/.msmtprc: No such file or 
> directory
>     falling back to default account
> *** using account default from /etc/msmtprc
>     host = smtp.gmail.com
> *** port = 465
>     source ip = (not set)
>     proxy host = (not set)
>     proxy port = 0
>     socket = (not set)
>     timeout = off
>     protocol = smtp
>     domain = localhost
> *** auth = choose
>     user = grant.b.edwa...@gmail.com
>     password = *
>     passwordeval = (not set)
>     ntlmdomain = (not set)
> *** tls = on
> *** tls_starttls = off
>     tls_trust_file = system
>     tls_crl_file = (not set)
>     tls_fingerprint = (not set)
>     tls_key_file = (not set)
>     tls_cert_file = (not set)
>     tls_certcheck = off
>     tls_min_dh_prime_bits = (not set)
>     tls_priorities = (not set)
>     tls_host_override = (not set)
>     auto_from = off
>     maildomain = gmail.org
>     from = grant.b.edwa...@gmail.com
>     from_full_name = (not set)
>     allow_from_override = on
>     set_from_header = auto
>     set_date_header = auto
>     remove_bcc_headers = on
>     undisclosed_recipients = off
>     dsn_notify = (not set)
>     dsn_return = (not set)
>     logfile = (not set)
>     logfile_time_format = (not set)
>     syslog = LOG_MAIL
> *** aliases = (not set)
>     reading recipients from the command line
>     TLS session parameters:
>         (TLS1.3)-(ECDHE-X25519)-(ECDSA-SECP256R1-SHA256)-(AES-256-GCM)
>     TLS certificate information:
>         Subject:
>             CN=smtp.gmail.com
>         Issuer:
>             C=US,O=Google Trust Services,CN=WR2
>         Validity:
>             Activation time: Mon 26 Aug 2024 02:12:09 AM CDT
>             Expiration time: Mon 18 Nov 2024 01:12:08 AM CST
>         Fingerprints:
>             SHA256: 
> 01:AF:90:6E:FC:06:5C:B5:5D:B9:55:AB:27:07:B0:E7:8C:4F:EA:46:70:67:86:A9:E0:F1:BB:F7:5A:2E:1B:64
>             SHA1 (deprecated): 
> F2:B7:9C:3C:4C:FD:57:31:37:BB:8D:F6:DD:F7:FB:A2:D7:09:B2:BD
>     <-- 220 smtp.gmail.com ESMTP 8926c6da1cb9f-4d8888f9f55sm483180173.166 - 
> gsmtp
>     --> EHLO localhost
>     <-- 250-smtp.gmail.com at your service, [24.152.157.105]
>     <-- 250-SIZE 35882577
>     <-- 250-8BITMIME
>     <-- 250-AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH
>     <-- 250-ENHANCEDSTATUSCODES
>     <-- 250-PIPELINING
>     <-- 250-CHUNKING
>     <-- 250 SMTPUTF8
>     --> AUTH PLAIN <**************deleted************************>==
>     <-- 235 2.7.0 Accepted
>     --> MAIL FROM:<grant.b.edwa...@gmail.com>
>     --> RCPT TO:<bogus>
>     --> DATA
>     <-- 250 2.1.0 OK 8926c6da1cb9f-4d8888f9f55sm483180173.166 - gsmtp
>     <-- 553-5.1.3 The recipient address <bogus> is not a valid RFC 5321 
> address. For
>     <-- 553-5.1.3 more information, go to
>     <-- 553-5.1.3  https://support.google.com/a/answer/3221692 and review RFC 
> 5321
>     <-- 553 5.1.3 specifications. 8926c6da1cb9f-4d8888f9f55sm483180173.166 - 
> gsmtp
>

See above.  I didn't get anything like that.  It seems to puke on the
first line it sees. 

Dale

:-)  :-) 

Reply via email to