From d1e6ea3e9d4c329a686c8fd18be7167d4cfe6df4 Mon Sep 17 00:00:00 2001 From: vitaly Date: Tue, 26 May 2009 15:06:40 +0000 Subject: [PATCH] Added feature: allow email address as user name for imap. Some imap servers (for example, gmx.com) requires email as user name to login. Sign `@' is a delimeter for network server name in folders-file, so use `*' instead of it in user names and convert it to `@' in place. You have to write your real user name `xxx@gmx.com' like `xxx*gmx.com' in ~/.folders or config file. --- elmo/elmo-imap4.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 92bec96..1f2576d 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -1907,9 +1907,15 @@ Return nil if no complete line has arrived." (elmo-imap4-encode-folder-string (cdr (assq 'mailbox tokens)))) ;; user - (elmo-net-folder-set-user-internal folder - (or (cdr (assq 'user tokens)) - default-user)) + (elmo-net-folder-set-user-internal + folder + (let ((user (cdr (assq 'user tokens)))) + (if user + (if (string-match "*" user) + (replace-match "@" nil nil user) + user) + default-user))) + ;; auth (elmo-net-folder-set-auth-internal folder -- 1.7.10.4