Spacemacs 에서 Email 클라이언트 mu4e 사용하기

isync – GMail을 포함한 여러 메일서버의 메일을 오프라인으로 받고 동기화

mu – isync등으로 받은 메일에 대해 인덱싱 및 검색

mu4e – mu interface of Emacs

 


mu4e 설치: brew install mu --with-emacs

isync 설치: brew install isync

isync를 통해 받은 메일 저장 위치: ~/.maildir

mu 인덱스 저장 위치는 ~/.mu

인덱스 생성: mu index --maildir ~/.maildir

 

 


# mbsyncrc based on
# http://www.ict4g.net/adolfo/notes/2014/12/27/EmacsIMAP.html

# ACCOUNT INFORMATION
IMAPAccount andrwj@gmail.com
# Address to connect to
Host imap.gmail.com
User user-id@gmail.com
Pass xxxxxxxxxxxxxxxx
AuthMechs LOGIN
SSLType IMAPS
# SSLVersions SSLv3
# CertificateFile ~/.maildir/gmail.crt

# THEN WE SPECIFY THE LOCAL AND REMOTE STORAGE
# - THE REMOTE STORAGE IS WHERE WE GET THE MAIL FROM (E.G., THE
#   SPECIFICATION OF AN IMAP ACCOUNT)
# - THE LOCAL STORAGE IS WHERE WE STORE THE EMAIL ON OUR COMPUTER

# REMOTE STORAGE (USE THE IMAP ACCOUNT SPECIFIED ABOVE)
IMAPStore gmail-remote
Account user-id@gmail.com

# LOCAL STORAGE (CREATE DIRECTORIES with mkdir -p Maildir/gmail)
MaildirStore gmail-local
Path ~/.maildir/gmail/andrwj@gmail.com/
Inbox ~/.maildir/gmail/andrwj@gmail.com/Inbox

# CONNECTIONS SPECIFY LINKS BETWEEN REMOTE AND LOCAL FOLDERS
#
# CONNECTIONS ARE SPECIFIED USING PATTERNS, WHICH MATCH REMOTE MAIl
# FOLDERS. SOME COMMONLY USED PATTERS INCLUDE:
#
# 1 "*" TO MATCH EVERYTHING
# 2 "!DIR" TO EXCLUDE "DIR"
# 3 "DIR" TO MATCH DIR

Channel gmail-inbox
Master :gmail-remote:
Slave :gmail-local:
Patterns "INBOX"
Create Both
Expunge Both
SyncState *

Channel gmail-sent
Master :gmail-remote:"[Google Mail]/Sent Mail"
Slave :gmail-local:"sent"
Create Both
Expunge Both
SyncState *

Channel gmail-drafts
Master :gmail-remote:"[Google Mail]/Drafts"
Slave :gmail-local:"drafts"
Create Both
Expunge Both
SyncState *

Channel gmail-trash
Master :gmail-remote:"[Google Mail]/Trash"
Slave :gmail-local:"trash"
Create Both
Expunge Both
SyncState *

Channel gmail-spam
Master :gmail-remote:"[Google Mail]/Spam"
Slave :gmail-local:"spam"
Create Both
Expunge Both
SyncState *

Channel gmail-all
Master :gmail-remote:"[Google Mail]/All Mail"
Slave :gmail-local:"all"
Create Both
Expunge Both
SyncState *

Channel gmail-starred
Master :gmail-remote:"[Google Mail]/Starred"
Slave :gmail-local:"starred"
Create Both
Expunge Both
SyncState *

# GROUPS PUT TOGETHER CHANNELS, SO THAT WE CAN INVOKE
# MBSYNC ON A GROUP TO SYNC ALL CHANNELS
#
# FOR INSTANCE: "mbsync gmail" GETS MAIL FROM
# "gmail-inbox", "gmail-sent", and "gmail-trash"
#
Group gmail
Channel gmail-inbox
Channel gmail-sent
Channel gmail-drafts
Channel gmail-trash
Channel gmail-spam
Channel gmail-all
Channel gmail-starred