nnimap.el (nnimap-user): New backend variable.
(nnimap-open-connection-1): Use it. (nnimap-credentials): Accept user parameter so it's explicit what user name is desired.
This commit is contained in:
parent
a6e77075d4
commit
5e68f8614f
2 changed files with 13 additions and 3 deletions
|
@ -1,4 +1,9 @@
|
||||||
2011-04-21 Teodor Zlatanov <tzz@lifelogs.com>
|
2011-04-22 Teodor Zlatanov <tzz@lifelogs.com>
|
||||||
|
|
||||||
|
* nnimap.el (nnimap-user): New backend variable.
|
||||||
|
(nnimap-open-connection-1): Use it.
|
||||||
|
(nnimap-credentials): Accept user parameter so it's explicit what user
|
||||||
|
name is desired.
|
||||||
|
|
||||||
* gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to
|
* gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to
|
||||||
default.
|
default.
|
||||||
|
|
|
@ -58,6 +58,9 @@
|
||||||
(defvoo nnimap-address nil
|
(defvoo nnimap-address nil
|
||||||
"The address of the IMAP server.")
|
"The address of the IMAP server.")
|
||||||
|
|
||||||
|
(defvoo nnimap-user nil
|
||||||
|
"Username to use for authentication to the IMAP server.")
|
||||||
|
|
||||||
(defvoo nnimap-server-port nil
|
(defvoo nnimap-server-port nil
|
||||||
"The IMAP port used.
|
"The IMAP port used.
|
||||||
If nnimap-stream is `ssl', this will default to `imaps'. If not,
|
If nnimap-stream is `ssl', this will default to `imaps'. If not,
|
||||||
|
@ -283,13 +286,14 @@ textual parts.")
|
||||||
(push (current-buffer) nnimap-process-buffers)
|
(push (current-buffer) nnimap-process-buffers)
|
||||||
(current-buffer)))
|
(current-buffer)))
|
||||||
|
|
||||||
(defun nnimap-credentials (address ports)
|
(defun nnimap-credentials (address ports user)
|
||||||
(let* ((auth-source-creation-prompts
|
(let* ((auth-source-creation-prompts
|
||||||
'((user . "IMAP user at %h: ")
|
'((user . "IMAP user at %h: ")
|
||||||
(secret . "IMAP password for %u@%h: ")))
|
(secret . "IMAP password for %u@%h: ")))
|
||||||
(found (nth 0 (auth-source-search :max 1
|
(found (nth 0 (auth-source-search :max 1
|
||||||
:host address
|
:host address
|
||||||
:port ports
|
:port ports
|
||||||
|
:user user
|
||||||
:require '(:user :secret)
|
:require '(:user :secret)
|
||||||
:create t))))
|
:create t))))
|
||||||
(if found
|
(if found
|
||||||
|
@ -408,7 +412,8 @@ textual parts.")
|
||||||
(list
|
(list
|
||||||
nnimap-address
|
nnimap-address
|
||||||
(nnoo-current-server 'nnimap)))
|
(nnoo-current-server 'nnimap)))
|
||||||
ports))))
|
ports
|
||||||
|
nnimap-user))))
|
||||||
(setq nnimap-object nil)
|
(setq nnimap-object nil)
|
||||||
(let ((nnimap-inhibit-logging t))
|
(let ((nnimap-inhibit-logging t))
|
||||||
(setq login-result
|
(setq login-result
|
||||||
|
|
Loading…
Add table
Reference in a new issue