# Example synchronizing Imap folders to maildir

# An action to save to the maildir ~/mail/inbox.
$path = "%h/mail"
action "inbox" maildir "${path}"
action "sent" maildir "${path}/sent"
action "junk" maildir "${path}/junk"

# Accounts: POP3, POP3S and IMAP. Note the double escaping of the '\'
# character in the password. If the port is omitted, the default
# ("pop3", "pop3s", "imap" or "imaps" in the services(5) db) is used.
account "imaps" imaps
server "<some domain>"
user "<some user>"
pass "<some password>"
folders { "INBOX" "INBOX.Sent" "INBOX.Junk" }

# Match folders to correct maildirs
# The order of the matching is important since "match string "%[folder]" to "INBOX" " also triggers for "INBOX.Sent" or "INBOX.Junk"
match string "%[folder]" to "INBOX.Sent" action "sent"
match string "%[folder]" to "INBOX.Junk" action "junk"
match string "%[folder]" to "INBOX" action "inbox"

# Match all other mail and deliver using the 'inbox' action.
match all action "inbox"
