Subject: Having to store password in mutliple places

From: Pranshu <[email-masked]>
Date: Mon, 05 Aug 2024 00:01:36 +1000

Right now to get a functional gnus setup in which I can send and recive
mail, I am having to store my password is 2 places, which is the mail
sources variable, and the authinfo file.  This makes it extremly
annoying and insecure, especially since I cannot encrypt one fo the
places I store the password.

If I remove password from authinfo file, I can still recive mail but not
send any.  And if I remove password from mail sources, I cannot recive
mail without typing my whole password when prompted on gnus startup.

Following is the code I have:

Elisp code:
----------------------------------------------------------
(setq user-mail-address "[email-masked]")
(setq user-full-name "Pranshu")
(setq smtpmail-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-service 465)
(setq smtpmail-stream-type  'ssl)
(setq mail-sources `((pop :server "pop.gmail.com"
						  :user ,user-mail-address
						  :password "**********" ; Password line
						  :port 995)))
----------------------------------------------------------

Authinfo:
----------------------------------------------------------
machine smtp.gmail.com login [email-masked] password **********  port 465
----------------------------------------------------------