I want to use Wanderlust IMAP client to read my email in Emacs.

However, when configured to use with Gmail account it doesn't update number of new messages correctly. Wanderlust's notification (ws-biff-*) system depends on this - I will get notified only if there're new messages.

For example, in the Folder view:


When I get a new message I should get the following:


However, what I see is the following:


All other functionality of Wanderlust works perfectly and I'd really love to make it handle notifications correctly.

I've installed it using el-get. Emacs version is 24.2.1. Wanderlust version is 2.15.9 (Almost Unreal).

Relevant part of ~/.emacs.d/init.el:

;; wanderlust
(autoload 'wl "wl" "Wanderlust" t)
(autoload 'wl-draft "wl-draft" "Write draft with Wanderlust." t)
(autoload 'wl-user-agent-compose "wl-draft" nil t)


(setq elmo-imap4-default-server "imap.gmail.com")
(setq elmo-imap4-default-user "my_email_address@gmail.com") 
(setq elmo-imap4-default-authenticate-type 'clear) 
(setq elmo-imap4-default-port '993)
(setq elmo-imap4-default-stream-type 'ssl)

(setq elmo-imap4-set-seen-flag-explicitly t)

(setq wl-smtp-connection-type 'starttls)
(setq wl-smtp-posting-port 587)
(setq wl-smtp-authenticate-type "plain")
(setq wl-smtp-posting-user "my_email_address@gmail.com")
(setq wl-smtp-posting-server "smtp.gmail.com")
(setq wl-local-domain "gmail.com")
(setq wl-icon-directory "~/.emacs.d/el-get/wanderlust/etc/icons")
(setq wl-default-folder "%inbox")
(setq wl-default-spec "%")
(setq wl-draft-folder "%[Gmail]/Drafts") ; Gmail IMAP
(setq wl-trash-folder "%[Gmail]/Trash")

(setq wl-folder-check-async t) 

(setq elmo-imap4-use-modified-utf7 t)

(if (boundp 'mail-user-agent)
    (setq mail-user-agent 'wl-user-agent))
(if (fboundp 'define-mail-user-agent)
(require 'tls)
(setq elmo-network-stream-type-alist '(("!" . (ssl ssl open-tls-stream))))

;; ignore  all fields
(setq wl-message-ignored-field-list '("^.*:"))
;; ..but these five
(setq wl-message-visible-field-list

(setq wl-message-sort-field-list
(setq wl-biff-check-folder-list '("%[Gmail]/Important" "%Workrelatedstuff"))
(setq wl-show-plug-status-on-modeline t)

(add-hook 'wl-biff-notify-hook
          (lambda (message &optional header)
             (format "New mail: %s. %s"
                     (substring message 0 (min 30 (length message)))))))

~/.folders is just :


How should I configure it to work properly with Gmail? Thanks in advance for any help!

2 Answers 2


As Google Mail does not support the \Recent-Flag, Wanderlust is not able to tell apart, if the mail is new. Other mail-clients propably track the new-state for themselve and dont rely on the \Recent-flag (which is not so cool, because the state is not safed server-side).


This issue can be solved via wl-strict-diff-folders. This specifies a list of folders for which Wanderlust will use a slower, but more accurate, method of counting messages. For example:

;; Check these folders for new mail
(setq wl-biff-check-folder-list 

;; Use strict diff so wl-biff works with Gmail and others
(setq wl-strict-diff-folders wl-biff-check-folder-list)

Note that the folder names must match the folder names in ~/.wl-folders exactly or updating the counts in the Folder view will not work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.