unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
@ 2016-08-20 18:12 Viktor Slavkovikj
  2016-08-20 19:45 ` Ivan Shmakov
  2020-09-07 15:29 ` Antoine Kalmbach
  0 siblings, 2 replies; 9+ messages in thread
From: Viktor Slavkovikj @ 2016-08-20 18:12 UTC (permalink / raw)
  To: 24274

[-- Attachment #1: Type: text/plain, Size: 317 bytes --]

Hi,

I thought that it would be convenient to obtain remote passwords in
Rmail from an authinfo file. Therefore, I modified rmail.el to make use
of the auth-source library. I include a patch for this small feature in
attachment. Do you think that there could be any drawbacks to using this
approach?

Thanks,
Viktor


[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 5920 bytes --]

*** /usr/local/src/emacs-24.5/lisp/mail/rmail.el	2015-04-02 09:23:06.000000000 +0200
--- /usr/local/src/emacs-24.5/lisp/mail/rmail-new.el	2016-08-20 18:59:06.944161712 +0200
***************
*** 1881,1923 ****
  "
    (cond
     ((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
!       (let (got-password supplied-password
! 	    (proto (match-string 1 file))
! 	    (user  (match-string 3 file))
! 	    (pass  (match-string 5 file))
! 	    (host  (substring file (or (match-end 2)
! 				       (+ 3 (match-end 1))))))
! 
! 	(if (not pass)
! 	    (when rmail-remote-password-required
! 	      (setq got-password (not (rmail-have-password)))
! 	      (setq supplied-password (rmail-get-remote-password
! 				       (string-equal proto "imap"))))
! 	  ;; The password is embedded.  Strip it out since movemail
! 	  ;; does not really like it, in spite of the movemail spec.
! 	  (setq file (concat proto "://" user "@" host)))
! 
! 	(if (rmail-movemail-variant-p 'emacs)
! 	    (if (string-equal proto "pop")
! 		(list (concat "po:" user ":" host)
! 		      t
! 		      (or pass supplied-password)
! 		      got-password)
! 	      (error "Emacs movemail does not support %s protocol" proto))
! 	  (list file
! 		(or (string-equal proto "pop") (string-equal proto "imap"))
! 		(or supplied-password pass)
! 		got-password))))
  
     ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
      (let (got-password supplied-password
!           (proto "pop")
! 	  (user  (match-string 1 file))
! 	  (host  (match-string 3 file)))
  
        (when rmail-remote-password-required
! 	(setq got-password (not (rmail-have-password)))
! 	(setq supplied-password (rmail-get-remote-password nil)))
  
        (list file "pop" supplied-password got-password)))
  
--- 1881,1923 ----
  "
    (cond
     ((string-match "^\\([^:]+\\)://\\(\\([^:@]+\\)\\(:\\([^@]+\\)\\)?@\\)?.*" file)
!     (let (got-password supplied-password
!                        (proto (match-string 1 file))
!                        (user  (match-string 3 file))
!                        (pass  (match-string 5 file))
!                        (host  (substring file (or (match-end 2)
!                                                   (+ 3 (match-end 1))))))
! 
!       (if (not pass)
!           (when rmail-remote-password-required
!             (setq got-password (not (rmail-have-password)))
!             (setq supplied-password (rmail-get-remote-password
!                                      (string-equal proto "imap") user host)))
!         ;; The password is embedded.  Strip it out since movemail
!         ;; does not really like it, in spite of the movemail spec.
!         (setq file (concat proto "://" user "@" host)))
! 
!       (if (rmail-movemail-variant-p 'emacs)
!           (if (string-equal proto "pop")
!               (list (concat "po:" user ":" host)
!                     t
!                     (or pass supplied-password)
!                     got-password)
!             (error "Emacs movemail does not support %s protocol" proto))
!         (list file
!               (or (string-equal proto "pop") (string-equal proto "imap"))
!               (or supplied-password pass)
!               got-password))))
  
     ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
      (let (got-password supplied-password
!                        (proto "pop")
!                        (user  (match-string 1 file))
!                        (host  (match-string 3 file)))
  
        (when rmail-remote-password-required
!         (setq got-password (not (rmail-have-password)))
!         (setq supplied-password (rmail-get-remote-password nil user host)))
  
        (list file "pop" supplied-password got-password)))
  
***************
*** 4455,4473 ****
    (interactive "sPassword: ")
    (if password
        (setq rmail-encoded-remote-password
! 	    (rmail-encode-string password (emacs-pid)))
      (setq rmail-remote-password nil)
      (setq rmail-encoded-remote-password nil)))
  
! (defun rmail-get-remote-password (imap)
!   "Get the password for retrieving mail from a POP or IMAP server.  If none
! has been set, then prompt the user for one."
    (when (not rmail-encoded-remote-password)
      (if (not rmail-remote-password)
! 	(setq rmail-remote-password
! 	      (read-passwd (if imap
! 			       "IMAP password: "
! 			     "POP password: "))))
      (rmail-set-remote-password rmail-remote-password)
      (setq rmail-remote-password nil))
    (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))
--- 4455,4480 ----
    (interactive "sPassword: ")
    (if password
        (setq rmail-encoded-remote-password
!             (rmail-encode-string password (emacs-pid)))
      (setq rmail-remote-password nil)
      (setq rmail-encoded-remote-password nil)))
  
! (defun rmail-get-remote-password (imap user host)
!   "Get the password for retrieving mail from a POP or IMAP server.
! If none has been set, check authinfo for one. If authinfo search
! yields no result, prompt the user for the password."
    (when (not rmail-encoded-remote-password)
      (if (not rmail-remote-password)
!         (setq rmail-remote-password
!               (let ((found (nth 0 (auth-source-search :max 1
!                                                       :user user                                                      
!                                                       :host host
!                                                       :require '(:secret)))))
!                    (if found
!                        (funcall (plist-get found :secret))
!                      (read-passwd (if imap
!                                       "IMAP password: "
!                                     "POP password: "))))))
      (rmail-set-remote-password rmail-remote-password)
      (setq rmail-remote-password nil))
    (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2016-08-20 18:12 bug#24274: 24.5; Use auth-source library for remote passwords in Rmail Viktor Slavkovikj
@ 2016-08-20 19:45 ` Ivan Shmakov
  2016-08-21 14:26   ` Viktor Slavkovik
  2020-09-07 15:29 ` Antoine Kalmbach
  1 sibling, 1 reply; 9+ messages in thread
From: Ivan Shmakov @ 2016-08-20 19:45 UTC (permalink / raw)
  To: 24274; +Cc: Viktor Slavkovikj

>>>>> Viktor Slavkovikj <zhtvk@gmx.com> writes:

 > Hi, I thought that it would be convenient to obtain remote passwords
 > in Rmail from an authinfo file.  Therefore, I modified rmail.el to
 > make use of the auth-source library.  I include a patch for this
 > small feature in attachment.  Do you think that there could be any
 > drawbacks to using this approach?

	Personally, I can’t readily think of any.  (Not that I’m
	particularly familiar with either.)

	One issue I see with your patch is that it expands TABs into
	spaces outside of the actual code changes.  If deliberate, I’d
	rather see such whitespace changes in a separate patch.

 > ! (defun rmail-get-remote-password (imap user host)
 > !   "Get the password for retrieving mail from a POP or IMAP server.
 > ! If none has been set, check authinfo for one. If authinfo search
 > ! yields no result, prompt the user for the password."

	The auth-source library allows access to other backends beside
	plain ~/.authinfo, which is why I think it makes sense to
	mention the library by name here.  See the docstring for the
	erc-autojoin-channels-alist variable for an example.

 >     (when (not rmail-encoded-remote-password)
 >       (if (not rmail-remote-password)
 > !         (setq rmail-remote-password
 > !               (let ((found (nth 0 (auth-source-search :max 1
 > !                                                       :user user                                                      
 > !                                                       :host host
 > !                                                       :require '(:secret)))))
 > !                    (if found
 > !                        (funcall (plist-get found :secret))
 > !                      (read-passwd (if imap
 > !                                       "IMAP password: "
 > !                                     "POP password: "))))))

	The auth-source-search function will prompt for password
	automatically if given ‘:create t’ among its parameters, making
	explicit read-passwd unnecessary.  (But check also the
	auth-source-creation-prompts variable.)

 >       (rmail-set-remote-password rmail-remote-password)
 >       (setq rmail-remote-password nil))
 >     (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2016-08-20 19:45 ` Ivan Shmakov
@ 2016-08-21 14:26   ` Viktor Slavkovik
  2016-08-21 19:30     ` Ivan Shmakov
  2019-06-25 11:54     ` Lars Ingebrigtsen
  0 siblings, 2 replies; 9+ messages in thread
From: Viktor Slavkovik @ 2016-08-21 14:26 UTC (permalink / raw)
  To: Ivan Shmakov; +Cc: 24274, zhtvk

[-- Attachment #1: Type: text/plain, Size: 2858 bytes --]

Ivan Shmakov <ivan@siamics.net> writes:

>>>>>> Viktor Slavkovikj <zhtvk@gmx.com> writes:
>
>  > Hi, I thought that it would be convenient to obtain remote passwords
>  > in Rmail from an authinfo file.  Therefore, I modified rmail.el to
>  > make use of the auth-source library.  I include a patch for this
>  > small feature in attachment.  Do you think that there could be any
>  > drawbacks to using this approach?
>
> 	Personally, I can’t readily think of any.  (Not that I’m
> 	particularly familiar with either.)
>
> 	One issue I see with your patch is that it expands TABs into
> 	spaces outside of the actual code changes.  If deliberate, I’d
> 	rather see such whitespace changes in a separate patch.
>
>  > ! (defun rmail-get-remote-password (imap user host)
>  > !   "Get the password for retrieving mail from a POP or IMAP server.
>  > ! If none has been set, check authinfo for one. If authinfo search
>  > ! yields no result, prompt the user for the password."
>
> 	The auth-source library allows access to other backends beside
> 	plain ~/.authinfo, which is why I think it makes sense to
> 	mention the library by name here.  See the docstring for the
> 	erc-autojoin-channels-alist variable for an example.
>
>  >     (when (not rmail-encoded-remote-password)
>  >       (if (not rmail-remote-password)
>  > !         (setq rmail-remote-password
>  > !               (let ((found (nth 0 (auth-source-search :max 1
>  > !                                                       :user user                                                      
>  > !                                                       :host host
>  > !                                                       :require '(:secret)))))
>  > !                    (if found
>  > !                        (funcall (plist-get found :secret))
>  > !                      (read-passwd (if imap
>  > !                                       "IMAP password: "
>  > !                                     "POP password: "))))))
>
> 	The auth-source-search function will prompt for password
> 	automatically if given ‘:create t’ among its parameters, making
> 	explicit read-passwd unnecessary.  (But check also the
> 	auth-source-creation-prompts variable.)
>
>  >       (rmail-set-remote-password rmail-remote-password)
>  >       (setq rmail-remote-password nil))
>  >     (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))

I've made an update (attached) to the previous patch. I removed the code
indentation spaces and changed the docstring to be more
descriptive. Also, I included a function check for the auth-source
password which was missing before.

I don't think that the ':create' parameter of auth-source-search should
be used here, since we don't know if the authentication will be
successful.


[-- Attachment #2: updated patch --]
[-- Type: application/octet-stream, Size: 3758 bytes --]

*** /usr/local/src/emacs-24.5/lisp/mail/rmail.el	2015-04-02 09:23:06.000000000 +0200
--- /usr/local/src/emacs-24.5/lisp/mail/rmail-new.el	2016-08-21 16:01:04.151928967 +0200
***************
*** 1892,1898 ****
  	    (when rmail-remote-password-required
  	      (setq got-password (not (rmail-have-password)))
  	      (setq supplied-password (rmail-get-remote-password
! 				       (string-equal proto "imap"))))
  	  ;; The password is embedded.  Strip it out since movemail
  	  ;; does not really like it, in spite of the movemail spec.
  	  (setq file (concat proto "://" user "@" host)))
--- 1892,1898 ----
  	    (when rmail-remote-password-required
  	      (setq got-password (not (rmail-have-password)))
  	      (setq supplied-password (rmail-get-remote-password
! 				       (string-equal proto "imap") user host)))
  	  ;; The password is embedded.  Strip it out since movemail
  	  ;; does not really like it, in spite of the movemail spec.
  	  (setq file (concat proto "://" user "@" host)))
***************
*** 1917,1923 ****
  
        (when rmail-remote-password-required
  	(setq got-password (not (rmail-have-password)))
! 	(setq supplied-password (rmail-get-remote-password nil)))
  
        (list file "pop" supplied-password got-password)))
  
--- 1917,1923 ----
  
        (when rmail-remote-password-required
  	(setq got-password (not (rmail-have-password)))
! 	(setq supplied-password (rmail-get-remote-password nil user host)))
  
        (list file "pop" supplied-password got-password)))
  
***************
*** 4459,4473 ****
      (setq rmail-remote-password nil)
      (setq rmail-encoded-remote-password nil)))
  
! (defun rmail-get-remote-password (imap)
!   "Get the password for retrieving mail from a POP or IMAP server.  If none
! has been set, then prompt the user for one."
    (when (not rmail-encoded-remote-password)
      (if (not rmail-remote-password)
! 	(setq rmail-remote-password
! 	      (read-passwd (if imap
! 			       "IMAP password: "
! 			     "POP password: "))))
      (rmail-set-remote-password rmail-remote-password)
      (setq rmail-remote-password nil))
    (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))
--- 4459,4490 ----
      (setq rmail-remote-password nil)
      (setq rmail-encoded-remote-password nil)))
  
! (defun rmail-get-remote-password (imap user host)
!   "Get the password for retrieving mail from a POP or IMAP server.
! If none has been set, the password is found via auth-source. If
! you use ~/.authinfo as your auth-source backend, then put
! something like the following in that file:
! 
! machine mymachine login myloginname password mypassword
! 
! If auth-source search yields no result, prompt the user for the
! password."
    (when (not rmail-encoded-remote-password)
      (if (not rmail-remote-password)
!         (setq rmail-remote-password
!               (let ((found (nth 0 (auth-source-search :max 1
!                                                       :user user                                                      
!                                                       :host host
!                                                       :require '(:secret))))
!                     (secret))
!                 (if found
!                     (progn
!                       (setq secret (plist-get found :secret))
!                       (if (functionp secret)
!                         (funcall secret)))
!                      (read-passwd (if imap
!                                       "IMAP password: "
!                                     "POP password: "))))))
      (rmail-set-remote-password rmail-remote-password)
      (setq rmail-remote-password nil))
    (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2016-08-21 14:26   ` Viktor Slavkovik
@ 2016-08-21 19:30     ` Ivan Shmakov
  2016-08-22 13:00       ` Ted Zlatanov
  2019-06-25 11:54     ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Ivan Shmakov @ 2016-08-21 19:30 UTC (permalink / raw)
  To: 24274; +Cc: Viktor Slavkovik, zhtvk

>>>>> Viktor Slavkovik <viktor.slavkovik@gmail.com> writes:
>>>>> Ivan Shmakov <ivan@siamics.net> writes:

[…]

 >> The auth-source-search function will prompt for password
 >> automatically if given ‘:create t’ among its parameters, making
 >> explicit read-passwd unnecessary.  (But check also the
 >> auth-source-creation-prompts variable.)

[…]

 > I've made an update (attached) to the previous patch.  I removed the
 > code indentation spaces and changed the docstring to be more
 > descriptive.  Also, I included a function check for the auth-source
 > password which was missing before.

 > !                 (if found
 > !                     (progn
 > !                       (setq secret (plist-get found :secret))
 > !                       (if (functionp secret)
 > !                         (funcall secret)))

	There, rmail-remote-password will end up being set to nil if
	‘secret’ is /not/ a function.  Compare:

                    (progn
                      (setq secret (plist-get found :secret))
                      (if (functionp secret)
                          (funcall secret)
                        secret))

 > I don't think that the ':create' parameter of auth-source-search
 > should be used here, since we don't know if the authentication will
 > be successful.

	We can call auth-source-forget+ if necessary once we figure it
	out; just like it’s done in gnus/nnimap.el and mail/smtpmail.el.

 > Content-Type: application/octet-stream

	I’d appreciate for the patches to come marked as something
	text/*, so that MIME-aware mail user agents could just display
	them (as opposed to: ask user to save one into a file.)  I guess
	that such a Content-Type: will be emitted automatically when the
	filename of the file being attached ends with .diff or .patch.

 > Content-Disposition: attachment; filename=patch_update
 > Content-Transfer-Encoding: base64
 > Content-Description: updated patch

-- 
FSF associate member #7257  http://am-1.org/~ivan/      … 3013 B6A0 230E 334A





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2016-08-21 19:30     ` Ivan Shmakov
@ 2016-08-22 13:00       ` Ted Zlatanov
  0 siblings, 0 replies; 9+ messages in thread
From: Ted Zlatanov @ 2016-08-22 13:00 UTC (permalink / raw)
  To: Ivan Shmakov; +Cc: 24274, zhtvk, Viktor Slavkovik

On Sun, 21 Aug 2016 19:30:43 +0000 Ivan Shmakov <ivan@siamics.net> wrote: 

>> I've made an update (attached) to the previous patch.  I removed the
>> code indentation spaces and changed the docstring to be more
>> descriptive.  Also, I included a function check for the auth-source
>> password which was missing before.

Thank you!

IS> 	We can call auth-source-forget+ if necessary once we figure it
IS> 	out; just like it’s done in gnus/nnimap.el and mail/smtpmail.el.

Right, those are the typical uses of auth-source.

IS> 	The auth-source library allows access to other backends beside
IS> 	plain ~/.authinfo, which is why I think it makes sense to
IS> 	mention the library by name here.  See the docstring for the
IS> 	erc-autojoin-channels-alist variable for an example.

Agreed! The authinfo file *format* is a default, but there are actually
three of them: '("~/.authinfo" "~/.authinfo.gpg" "~/.netrc")

Thanks
Ted





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2016-08-21 14:26   ` Viktor Slavkovik
  2016-08-21 19:30     ` Ivan Shmakov
@ 2019-06-25 11:54     ` Lars Ingebrigtsen
  2020-08-11 14:12       ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-25 11:54 UTC (permalink / raw)
  To: Viktor Slavkovik; +Cc: 24274, zhtvk, Ivan Shmakov

Viktor Slavkovik <viktor.slavkovik@gmail.com> writes:

> I've made an update (attached) to the previous patch. I removed the code
> indentation spaces and changed the docstring to be more
> descriptive. Also, I included a function check for the auth-source
> password which was missing before.

This makes sense to me -- all password things in Emacs should go through
auth-source, I think.

But I'm not an rmail user, so I can't test this...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2019-06-25 11:54     ` Lars Ingebrigtsen
@ 2020-08-11 14:12       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-11 14:12 UTC (permalink / raw)
  To: Viktor Slavkovik; +Cc: 24274, zhtvk, Ivan Shmakov

Lars Ingebrigtsen <larsi@gnus.org> writes:

> This makes sense to me -- all password things in Emacs should go through
> auth-source, I think.
>
> But I'm not an rmail user, so I can't test this...

I've re-spun the patch for Emacs 28.  Can somebody that uses rmail test
this?

diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el
index 44cde7cb5a..fc670ebe2b 100644
--- a/lisp/mail/rmail.el
+++ b/lisp/mail/rmail.el
@@ -39,6 +39,7 @@
 
 (require 'mail-utils)
 (require 'rfc2047)
+(require 'auth-source)
 
 (require 'rmail-loaddefs)
 
@@ -1917,7 +1918,8 @@ rmail-parse-url
 		(when rmail-remote-password-required
 		  (setq got-password (not (rmail-have-password)))
 		  (setq supplied-password (rmail-get-remote-password
-					   (string-match "^imaps?" proto))))
+					   (string-match "^imaps?" proto)
+                                           user host)))
 	      ;; FIXME
 	      ;; The password is embedded.  Strip it out since movemail
 	      ;; does not really like it, in spite of the movemail spec.
@@ -1938,13 +1940,13 @@ rmail-parse-url
    ((string-match "^po:\\([^:]+\\)\\(:\\(.*\\)\\)?" file)
     (let (got-password supplied-password
           ;; (proto "pop")
-	  ;; (user  (match-string 1 file))
-	  ;; (host  (match-string 3 file))
+	  (user  (match-string 1 file))
+	  (host  (match-string 3 file))
           )
 
       (when rmail-remote-password-required
 	(setq got-password (not (rmail-have-password)))
-	(setq supplied-password (rmail-get-remote-password nil)))
+	(setq supplied-password (rmail-get-remote-password nil user host)))
 
       (list file "pop" supplied-password got-password)))
 
@@ -4498,15 +4500,32 @@ rmail-set-remote-password
     (setq rmail-remote-password nil)
     (setq rmail-encoded-remote-password nil)))
 
-(defun rmail-get-remote-password (imap)
-  "Get the password for retrieving mail from a POP or IMAP server.  If none
-has been set, then prompt the user for one."
+(defun rmail-get-remote-password (imap user host)
+  "Get the password for retrieving mail from a POP or IMAP server.
+If none has been set, the password is found via auth-source. If
+you use ~/.authinfo as your auth-source backend, then put
+something like the following in that file:
+
+machine mymachine login myloginname password mypassword
+
+If auth-source search yields no result, prompt the user for the
+password."
   (when (not rmail-encoded-remote-password)
     (if (not rmail-remote-password)
-	(setq rmail-remote-password
-	      (read-passwd (if imap
-			       "IMAP password: "
-			     "POP password: "))))
+        (setq rmail-remote-password
+              (let ((found (nth 0 (auth-source-search :max 1
+                                                      :user user                                                      
+                                                      :host host
+                                                      :require '(:secret))))
+                    (secret))
+                (if found
+                    (progn
+                      (setq secret (plist-get found :secret))
+                      (if (functionp secret)
+                        (funcall secret)))
+                     (read-passwd (if imap
+                                      "IMAP password: "
+                                    "POP password: "))))))
     (rmail-set-remote-password rmail-remote-password)
     (setq rmail-remote-password nil))
   (rmail-encode-string rmail-encoded-remote-password (emacs-pid)))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2016-08-20 18:12 bug#24274: 24.5; Use auth-source library for remote passwords in Rmail Viktor Slavkovikj
  2016-08-20 19:45 ` Ivan Shmakov
@ 2020-09-07 15:29 ` Antoine Kalmbach
  2020-09-07 15:58   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Antoine Kalmbach @ 2020-09-07 15:29 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 24274, Viktor Slavkovik


Lars Ingebrigtsen writes:

> I've re-spun the patch for Emacs 28.  Can somebody that uses rmail
> test this?

I can confirm it works. Applied the patch and it works perfectly. Tested with
both passwords in ~/.authinfo and the macOS keychain, the value of auth-sources
was:

   (macos-keychain-generic macos-keychain-internet "~/.authinfo" "~/.authinfo.gpg" "~/.netrc")

The version of Emacs used was

   GNU Emacs 27.1 (build 1, x86_64-apple-darwin18.7.0, Carbon Version 158 AppKit 1671.6) of 2020-08-16

-- 
Antoine Kalmbach





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#24274: 24.5; Use auth-source library for remote passwords in Rmail
  2020-09-07 15:29 ` Antoine Kalmbach
@ 2020-09-07 15:58   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-07 15:58 UTC (permalink / raw)
  To: Antoine Kalmbach; +Cc: 24274, Viktor Slavkovik

Antoine Kalmbach <ane@iki.fi> writes:

> I can confirm it works. Applied the patch and it works
> perfectly. Tested with both passwords in ~/.authinfo and the macOS
> keychain, the value of auth-sources was:

Thanks for testing.  I've now applied the patch to Emacs 28.  (It was
almost too long to apply without copyright assignment papers, but
squeaked in.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-07 15:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-20 18:12 bug#24274: 24.5; Use auth-source library for remote passwords in Rmail Viktor Slavkovikj
2016-08-20 19:45 ` Ivan Shmakov
2016-08-21 14:26   ` Viktor Slavkovik
2016-08-21 19:30     ` Ivan Shmakov
2016-08-22 13:00       ` Ted Zlatanov
2019-06-25 11:54     ` Lars Ingebrigtsen
2020-08-11 14:12       ` Lars Ingebrigtsen
2020-09-07 15:29 ` Antoine Kalmbach
2020-09-07 15:58   ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).