incoming mail appears in mu4e inbox long minutes after it is there. I can see it in the webmail service online immidiately but in emacs it doesn't show till a few minutes or even half an hour after..

my mu4e config:

(setq mu4e-get-mail-command "offlineimap")
(setq mu4e-attachment-dir  "~/Downloads")
(setq mu4e-view-show-addresses 't)

(setq mu4e-sent-folder "/Sent"
  mu4e-drafts-folder "/Drafts"
  mu4e-trash-folder "/Trash"
  message-send-mail-function 'smtpmail-send-it
  user-mail-address "[email protected]"
  user-full-name  "Adam Gefen"
  smtpmail-default-smtp-server "smtp.MYMAIL.com"
  smtpmail-smtp-server "MYMAIL.com"
  smtpmail-stream-type 'starttls
  smtpmail-smtp-service 587)

#starting mu4e in its own frame:
(defun mu4e-in-new-frame ()
 "Start mu4e in new frame."
(select-frame (make-frame))

and my .offlineimaprc config is:

accounts = XXXX

[Account XXXX]
localrepository = Local
remoterepository = Remote
autorefresh = 5
quick = 10
postsynchook = mu index --maildir ~/Maildir

[Repository Local]
type = Maildir
localfolders = ~/Maildir

[Repository Remote]
type = IMAP
remotehost = XXXX.COM
remoteuser = [email protected]
remotepass = XXXXXXXX
keepalive = 60
holdconnectionopen = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt

1 Answer 1


mu4e farms out the actual email checking to an external program such as offlineimap. The variable mu4e-update-interval controls how often mu4e will call that program.

Here's the docstring:


Number of seconds between automatic calls to retrieve mail and update the database. If nil, don't update automatically. Note, changes in mu4e-update-interval only take effect after restarting mu4e.

The following code:

(setq mu4e-get-mail-command "offlineimap -o"
      mu4e-update-interval  300)

will do the following:

  • have mu4e run offlineimap to fetch mail (the -o switch is to have offlineimap run "once")
  • do this every 300 seconds (i.e., every 5 minutes)

Your Answer

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

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