# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.35.8-ikhpv1 x86_64 Debian 7.6 ext3
mail_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
first_valid_gid = 7788
first_valid_uid = 7788
last_valid_gid = 7788
last_valid_uid = 7788
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/var/email/%d/%n/Maildir:LAYOUT=fs
mail_privileged_group = email
passdb {
  args = /etc/dovecot/dovecot-pgsql.conf
  driver = sql
}
protocols = imap pop3 sieve lmtp
service auth {
  executable = /usr/lib/dovecot/auth
  inet_listener {
    port = DOVECOT_SASL_PORT
    address = 0.0.0.0
  }
  unix_listener auth-master {
    group = email
    mode = 0600
    user = email
  }
}
ssl_ca = </etc/ssl/private/mail-chain.crt
ssl_cert = </etc/ssl/private/mail.crt
ssl_key = </etc/ssl/private/mail.key
userdb {
  args = /etc/dovecot/dovecot-pgsql.conf
  driver = sql
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  mail_plugins = sieve
  postmaster_address = postmaster@example.org
}

protocol lmtp {
  mail_plugins = sieve
}

plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve

  sieve_global_dir = /etc/dovecot/sieve/include/
  sieve_default = /etc/dovecot/sieve/default.sieve
  sieve_before = /etc/dovecot/sieve/before/
  sieve_after = /etc/dovecot/sieve/after/
}

service managesieve-login {
  inet_listener sieve {
    address = 0.0.0.0
  }
}

log_path = /dev/stderr

postmaster_address = postmaster@example.org

service lmtp {
  inet_listener lmtp {
    address = 0.0.0.0
    port = DOVECOT_LMTP_PORT
  }
}

namespace inbox {
  type = private
  separator = .
  inbox = yes
  mailbox Drafts {
    special_use = \Drafts
    auto = subscribe
  }

  mailbox Junk {
    special_use = \Junk
    auto = create
  }

  mailbox spam {
    special_use = \Junk
    auto = no
  }

  mailbox Spam {
    special_use = \Junk
    auto = no
  }

  mailbox Trash {
    special_use = \Trash
    auto = subscribe
  }

  mailbox TRASH {
    special_use = \Trash
    auto = no
  }

  mailbox Sent {
    special_use = \Sent
    auto = subscribe
  }

  mailbox "Sent Mail" {
    special_use = \Sent
    auto = no
  }

  mailbox "Sent Messages" {
    special_use = \Sent
    auto = no
  }

  mailbox Archive {
    special_use = \Archive
    auto = create
  }

  mailbox "Archives" {
    special_use = \Archive
    auto = no
  }
}
