To help keep your account secure, starting May 30, 2022, Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
Please note this deadline does not apply to Google Workspace or Google Cloud Identity customers. The enforcement date for these customers will be announced on the Workspace blog at a later date.
For more information, please continue reading.
Special Note on Apple Device Sign-Ins. Users who have not recently signed into their Google Account using only username and password will be able to only make new sign in attempts using the Google account type starting from February 28, 2022. Existing users may continue to sign into their Google Account using their username and password until May 30, 2022.
####
msmtp --configure=tallharry84@gmail.com
####
gpg --full-generate-key
####
password newline
CTRL-D
$
####
$ gpg --list-secret-keys --keyid-format LONG
gpg: checking the trustdb
gpg: marginals needed: 3 completes needed: 1 trust model: pgp
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
/home/pi/.gnupg/pubring.kbx
---------------------------
sec rsa3072/7D027B03F4826BFA 2022-05-09 [SC]
D4E5BC39CE4FBA0C694BBF837D027B03F4826BFA
uid [ultimate] harry (tja)
ssb rsa3072/017426C56FA76146 2022-05-09 [E]
####
#Set default values for all accounts.
defaults
auth on
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp.log
#Gmail settings
account gmail
host smtp.gmail.com
port 587
from tallharry84gmail.com
user tallharry84
#passwordeval gpg --decrypt /home/pi/msmtp-password.gpg
password redacted
#Set a default account
account default : gmail
####
$ echo "BEEP BEEP" | mailx -s "Subject: This is a test!" tallharry84@gmail.com
send-mail: cannot log to /var/log/msmtp.log: cannot open: Permission denied
send-mail: log info was: host=smtp.gmail.com tls=on auth=on user=tallharry84 from=tallharry84@gmail.com recipients=tallharry84@gmail.com mailsize=229 smtpstatus=250 smtpmsg='250 2.0.0 OK 1652063682 bh2-20020a170902a98200b0015e8d4eb2desm5726348plb.296 - gsmtp' exitcode=EX_OK
$