개인적으로 gmail 계정이 2개라서 이를 등록해서 사용하려 설정을 추가함

아래의 설정을 변경하면 2개 이상의 여러 계정에 대해서 사용 가능

gist 링크의 설정 확인


직접 설정한  .muttrc 설정

 % vim ~/.muttrc

# Folder hooks
folder-hook 'account.com.gmail.news' 'source ~/.mutt/account.com.gmail.news'
folder-hook 'account.com.gmail.mail' 'source ~/.mutt/account.com.gmail.mail'

# Default account
source ~/.mutt/account.com.gmail.news

# Macros for switching accounts
macro index <f2> '<sync-mailbox><enter-command>source ~/.mutt/account.com.gmail.news<enter><change-folder>!<enter>'
macro index <f3> '<sync-mailbox><enter-command>source ~/.mutt/account.com.gmail.mail<enter><change-folder>!<enter>'

# Fetch mail shortcut
bind index G imap-fetch-mail

F2 키를 누르면 1번 설정인 news관련 계정으로 로그인해서 메일 확인

F3 키를 누르면 2번 설정인 mail 관련 계정으로 로그인해서 메일 확인


아래와 같이 계정 관련 파일을 생성해주고 2개의 파일에

account.com.gmail.mail
account.com.gmail.news

각 계정에 대한 설정을 해주면 완료

<
 % cd ~/.mutt
% ls -al

total 16
drwx------ 7 byungwoo staff 224 12 22 11:06 .
drwxr-xr-x+ 112 byungwoo staff 3584 12 26 18:43 ..
-rw-r--r-- 1 byungwoo staff 506 12 22 11:05 account.com.gmail.mail
-rw-r--r-- 1 byungwoo staff 510 12 22 11:06 account.com.gmail.news
drwx------ 4 byungwoo staff 128 12 22 10:29 cache
drwxr-xr-x 2 byungwoo staff 64 12 22 11:05 com.gmail.mail
drwxr-xr-x 2 byungwoo staff 64 12 22 11:06 com.gmail.news

설치하고 나서는 설정파일에 세팅만 하면 끝이난다.


F2, F3키를 이용해서 각 계정으로 이동 가능

반응형

+ Recent posts