mmv

mailserver bootstrap script
git clone git://git.yotsev.xyz/mmv.git
Log | Files | Refs | README | LICENSE

local.conf (2547B)


      1 # listen on IPv4 and IPv6
      2 
      3 listen = *, ::
      4 
      5 #
      6 # authentication
      7 #
      8 
      9 # tls
     10 
     11 disable_plaintext_auth = yes
     12 ssl = required
     13 ssl_cert = </etc/ssl/<maildom>.crt
     14 ssl_key = </etc/ssl/private/<maildom>.key
     15 ssl_min_protocol = TLSv1.2
     16 ssl_cipher_list = ALL:!LOW:!EXP:!aNULL
     17 ssl_prefer_server_ciphers = yes
     18 
     19 # user authentication
     20 
     21 auth_mechanisms = plain login
     22 first_valid_uid = 2000
     23 first_valid_gid = 2000
     24 userdb {
     25   args = username_format=%u /etc/mail/credentials
     26   driver = passwd-file
     27   name =
     28 }
     29 passdb {
     30   args = scheme=CRYPT username_format=%u /etc/mail/credentials
     31   driver = passwd-file
     32   name =
     33 }
     34 
     35 #
     36 # mailbox
     37 #
     38 
     39 mail_location = maildir:/var/vmail/%d/%n:INBOX=/var/vmail/%d/%n/Inbox:LAYOUT=fs
     40 
     41 namespace inbox {
     42   inbox = yes
     43   type = private
     44   list = yes
     45   hidden = no
     46   subscriptions = yes
     47   separator = /
     48   prefix =
     49   location = maildir:/var/vmail/%d/%n:INBOX=/var/vmail/%d/%n/Inbox:LAYOUT=fs
     50 
     51   mailbox Archive {
     52     auto = subscribe
     53     special_use = \Archive
     54   }
     55   mailbox Drafts {
     56     auto = subscribe
     57     special_use = \Drafts
     58   }
     59   mailbox Junk {
     60     auto = subscribe
     61     special_use = \Junk
     62   }
     63   mailbox Sent {
     64     auto = subscribe
     65     special_use = \Sent
     66   }
     67   mailbox Trash {
     68     auto = subscribe
     69     special_use = \Trash
     70   }
     71 }
     72 
     73 #
     74 # protocol settings
     75 #
     76 
     77 protocols = imap
     78 
     79 service imap-login {
     80   inet_listener imap {
     81     port = 0
     82   }
     83 }
     84 
     85 #
     86 # sieve
     87 #
     88 
     89 protocols = $protocols sieve
     90 
     91 mail_plugin_dir = /usr/local/lib/dovecot
     92 
     93 plugin {
     94   imapsieve_mailbox1_before = file:/usr/local/lib/dovecot/sieve/report-spam.sieve
     95   imapsieve_mailbox1_causes = COPY
     96   imapsieve_mailbox1_name = Junk
     97   imapsieve_mailbox2_before = file:/usr/local/lib/dovecot/sieve/report-ham.sieve
     98   imapsieve_mailbox2_causes = COPY
     99   imapsieve_mailbox2_from = Junk
    100   imapsieve_mailbox2_name = *
    101   sieve = file:~/sieve;active=~/.dovecot.sieve
    102   sieve_global_extensions = +vnd.dovecot.pipe +vnd.dovecot.environment
    103   sieve_pipe_bin_dir = /usr/local/lib/dovecot/sieve
    104   sieve_plugins = sieve_imapsieve sieve_extprograms
    105 }
    106 
    107 service managesieve-login {
    108   inet_listener sieve {
    109     port = 4190
    110   }
    111   inet_listener sieve_deprecated {
    112     port = 2000
    113   }
    114 }
    115 
    116 protocol imap {
    117   mail_plugins = "imap_sieve"
    118 }
    119 
    120 managesieve_notify_capability = mailto
    121 managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex  imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapsieve vnd.dovecot.imapsieve
    122 
    123 #
    124 # OpenBSD specific
    125 #
    126 
    127 mmap_disable = yes