The basic idea is to first install the Davmail server version and convert the Exchange service to a standard service such as SMTP, POP3, IMAP.
Then use Emacs's mu4e to connect to the Davmail IMAP service.
How to install Davmail server please refer to my previous article, which has been updated:
Davmail Server Edition Configuration
Because of the IMAP service, I can use the way I wrote before to access Gmail using Gnus so that I can receive mail in Emacs. But I decided to try a new approach to mu4e. It is said that this is very good.
Installation Method Reference:
Http://www.djcbsoftware.nl/code/mu/mu4e/Installation.html#Installation
Offlineimap Download mail
You need to use Offlineimap to download the mail from your company's mailbox to local by using Davmail server before using it. The main requirement is to configure a file ~/.OFFLINEIMAPRC
Http://www.djcbsoftware.nl/code/mu/mu4e/Gmail-configuration.html#Gmail-configuration
[general]accounts = letvmaxsyncaccounts = 3[account Letv]localrepository = Localremoterepository = Remote[Repository Local]type = Maildirlocalfolders = ~/mail[repository Remote]type = Imapremotehost = $dav _mail_serverremoteport = 1143remo Teuser = $your _account, no @remotepass = $your _pwdssl = Falsesslcacertfile =/etc/ssl/certs/ Ca-certificates.crtmaxconnections = 1realdelete = no
Attention:
1. The company mailbox in the custom directory preferably no Chinese name, or bad luck will be error
2. To create a local directory ~/mail
3. Maxcoinnections can only be set to 1, more than 1 I have encountered an error, can only slowly download
OK, and then in the ~ directory, run the command
Offlineimap
My mail more, more than 10,000, 5.1GB, and so on a night finally download completed.
Index Local mail
OK, now the mail is in the local ~/mail directory, to build the index it.
$ mu index-m ~/mailindexing messages under/home/dean/mail [/home/dean/.mu/xapian]-processing mail; processed:11625; updated/new:11625, cleaned-up:0mu:ignoring because bigger than 50000000 bytes:/home/dean/mail/inbox/cur/1416665450_ 0.29886.dean-aspire-v7-481g,u=5238,fmd5=7e33429f656f1e6e9d79b29c3f82c57e:2,s/processing Mail; processed:14550; updated/new:14550, cleaned-up:0mu:ignoring because bigger than 50000000 bytes:/home/dean/mail/inbox/cur/1416671339_ 0.29886.dean-aspire-v7-481g,u=9646,fmd5=7e33429f656f1e6e9d79b29c3f82c57e:2,s/processing Mail; processed:23550; updated/new:23550, cleaned-up:0mu:ignoring because bigger than 50000000 bytes:/home/dean/mail/sent/cur/1416682079_ 0.29886.dean-aspire-v7-481g,u=1719,fmd5=7f8c0283f16925caed8e632086b81b9c:2,s/processing Mail; processed:24750; updated/new:24750, cleaned-up:0cleaning up messages [/home/dean/.mu/xapian]| Processing mail; processed:24807; updated/new:0, cleaned-up:0elapsed:1 second (s), ~ 24807 msg/s/proceSsing Mail; processed:24807; updated/new:0, cleaned-up:0elapsed:191 second (s), ~ 129 msg/s
Configuring Emacs mu4e
In the ~/.emacs.d/init.el file, add the following configuration:
;; The exact path may differ-check it (add-to-list ' Load-path "/usr/local/share/emacs/site-lisp/mu4e") (Require ' mu4e) ( SETQ mu4e-maildir "~/mail") (setq mu4e-drafts-folder "/drafts") (setq mu4e-sent-folder "/sent") (setq mu4e-trash-folder ") /trash "); Don ' t save message to Sent Messages, Gmail/imap takes care of this (setq mu4e-sent-messages-behavior ' delete); Setup some handy shortcuts;; You can quickly switch to your Inbox-Press ' Ji ';; Then if you want archive some messages, move them to;; The ' All Mail ' folder by pressing ' Ma '. (Setq mu4e-maildir-shortcuts ' ("/inbox".?? i) ("/[letv]. Sent Mail ". ? s) ("/[letv"). Trash ". ? t) ("/[letv". All Mail ". ? a))); Allow for updating mail using ' U ' in the main view: (setq mu4e-get-mail-command "Offlineimap"); Something about ourselves (setq user-mail-address "[email protected]" user-full-name "Dean Chen" message-signature (concat "Dean chen\n" "Email: [email protected]\n") "blog:blog.csdn.net/csfreebird\n" "Big Data Tech Director of letv.com" "\ n"));; Sending mail--replace USERNAME with your Gmail USERNAME;; Also, make sure the GNUTLS command line utils is installed; Package ' Gnutls-bin ' in Debian/ubuntu (Require ' smtpmail);; Alternatively, for emacs-24 your can use: (setq message-send-mail-function ' smtpmail-send-it smtpmail-stream-type ' Startt LS smtpmail-default-smtp-server "$dav _mail_server" Smtpmail-smtp-server "$dav _mail_server" Smtpmail-smtp-service 1025);; Don ' t keep message buffers around (setq message-kill-buffer-on-exit t);; ----------------------------------------------------------;; ----END Email client----;; ----------------------------------------------------------(Put ' erase-buffer ' disabled nil)
Then start Emacs, m-x after running the command: MU4E, see the following screen:
Receive exchange messages with Emacs