iredmail / iRedMail / samples / dovecot / dovecot2.conf

Zhang Huangbin f2f31b2 



Zhang Huangbin cb73abb 
Zhang Huangbin 3894acb 
Zhang Huangbin f2f31b2 

Zhang Huangbin deff4fe 
Zhang Huangbin f2f31b2 























Zhang Huangbin 7807d21 
Zhang Huangbin f2f31b2 
Zhang Huangbin ea8a387 
Zhang Huangbin 7807d21 

Zhang Huangbin f2f31b2 
Zhang Huangbin ce5daa5 


Zhang Huangbin 7807d21 




Zhang Huangbin f2f31b2 





Zhang Huangbin 97d479a 
Zhang Huangbin f2f31b2 



Zhang Huangbin 60358ce 








Zhang Huangbin f2f31b2 










Zhang Huangbin 30af58b 




Zhang Huangbin f2f31b2 











Zhang Huangbin 0eea304 











Zhang Huangbin f2f31b2 




























Zhang Huangbin 5cf07d6 

Zhang Huangbin f2f31b2 




Zhang Huangbin 98f0394 




Zhang Huangbin f2f31b2 










Zhang Huangbin 35864f1 






Zhang Huangbin f2f31b2 



















Zhang Huangbin 5cf07d6 
Zhang Huangbin f2f31b2 





Zhang Huangbin deff4fe 
Zhang Huangbin f2f31b2 





Zhang Huangbin 06b850a 
Zhang Huangbin f2f31b2 
Zhang Huangbin 06b850a 






Zhang Huangbin f2f31b2 

Zhang Huangbin deff4fe 
Zhang Huangbin f2f31b2 

Zhang Huangbin 06b850a 




Zhang Huangbin f2f31b2 
Zhang Huangbin d40924f 
Zhang Huangbin 7f431f4 
















Zhang Huangbin 76acea9 
Zhang Huangbin 7f431f4 







Zhang Huangbin f2f31b2 
















Zhang Huangbin d40924f 














# Listen addresses.
#   - '*' means all available IPv4 addresses.
#   - '[::]' means all available IPv6 addresses.
# Listen on all available addresses by default
listen = *

#base_dir = PH_BASE_DIR
mail_plugins = quota

# Enabled mail protocols.
protocols = PH_PROTOCOLS

# User/group who owns the message files:
mail_uid = PH_MAIL_UID
mail_gid = PH_MAIL_GID

# Assign uid to virtual users.
first_valid_uid = PH_FIRST_VALID_UID
last_valid_uid = PH_LAST_VALID_UID

# Logging. Reference: http://wiki2.dovecot.org/Logging
log_path = PH_LOG_PATH
mail_debug = no
auth_verbose = no
auth_debug = no
auth_debug_passwords = no
# Possible values: no, plain, sha1.
auth_verbose_passwords = no

# SSL: Global settings.
# Refer to wiki site for per protocol, ip, server name SSL settings:
# http://wiki2.dovecot.org/SSL/DovecotConfiguration
ssl = required
verbose_ssl = no
#ssl_ca =</path/to/ca
ssl_cert = <PH_SSL_CERT
ssl_key = <PH_SSL_KEY

# With disable_plaintext_auth=yes AND ssl=required, STARTTLS is mandatory.
# Set disable_plaintext_auth=no AND ssl=yes to allow plain password transmitted
# insecurely.
disable_plaintext_auth = yes
# Allow plain text password per IP address/net
#remote 192.168.0.0/24 {
#   disable_plaintext_auth = no
#}

# Mail location and mailbox format.
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/

# Authentication related settings.
# Append this domain name if client gives empty realm.
auth_default_realm = PH_AUTH_DEFAULT_REALM

# Authentication mechanisms.
auth_mechanisms = PH_AUTH_MECHANISMS

# Limits the number of users that can be logging in at the same time.
# Default is 100.
# Note: this value can be overrided by "process_limit =" in service
#       protocol. e.g.
#       protocol imap-login {
#           process_limit = 500
#       }
#default_process_limit = 100

service auth {
    unix_listener /var/spool/postfix/dovecot-auth {
        user = PH_DOVECOT_AUTH_USER
        group = PH_DOVECOT_AUTH_GROUP
        mode = 0666
    }
    unix_listener auth-master {
        user = PH_AUTH_MASTER_USER
        group = PH_AUTH_MASTER_GROUP
        mode = 0666
    }
    unix_listener auth-userdb {
        user = PH_AUTH_MASTER_USER
        group = PH_AUTH_MASTER_GROUP
        mode = 0660
    }
}

# Virtual mail accounts.
userdb {
    args = PH_USERDB_ARGS
    driver = PH_USERDB_DRIVER
}
passdb {
    args = PH_PASSDB_ARGS
    driver = PH_PASSDB_DRIVER
}

# Master user.
# Master users are able to log in as other users. It's also possible to
# directly log in as any user using a master password, although this isn't
# recommended.
# Reference: http://wiki2.dovecot.org/Authentication/MasterUsers
auth_master_user_separator = *
passdb {
    driver = passwd-file
    args = PH_DOVECOT_MASTER_USER_PASSWORD_FILE
    master = yes
}

plugin {
    auth_socket_path = PH_AUTH_SOCKET_PATH

    quota = PH_QUOTA_TYPE
    quota_rule = *:storage=1G
    #quota_rule2 = *:messages=0
    #quota_rule3 = Trash:storage=1G
    #quota_rule4 = Junk:ignore

    # Quota warning.
    # If user suddenly receives a huge mail and the quota jumps from
    # 85% to 95%, only the 95% script is executed.
    quota_warning = storage=85%% quota-warning 85 %u
    quota_warning2 = storage=90%% quota-warning 90 %u
    quota_warning3 = storage=95%% quota-warning 95 %u

    # Plugin: autocreate. Create and subscribe to default IMAP folders.
    autocreate = INBOX
    autocreate2 = Sent
    autocreate3 = Trash
    autocreate4 = Drafts
    autocreate5 = Junk
    autosubscribe = INBOX
    autosubscribe2 = Sent
    autosubscribe3 = Trash
    autosubscribe4 = Drafts
    autosubscribe5 = Junk

    # Plugin: expire.
    #expire = Trash 7 Trash/* 7 Junk 30
    #expire_dict = proxy::expire

    # ACL and share folder
    acl = vfile
    acl_shared_dict = proxy::acl

    # By default Dovecot doesn't allow using the IMAP "anyone" or
    # "authenticated" identifier, because it would be an easy way to spam
    # other users in the system. If you wish to allow it,
    #acl_anyone = allow

    # Pigeonhole managesieve service.
    # Reference: http://wiki2.dovecot.org/Pigeonhole/Sieve/Configuration
    # Per-user sieve settings.
    sieve_dir = /%Lh/sieve
    sieve = /%Lh/sieve/PH_SIEVE_RULE_FILENAME

    # Global sieve settings.
    sieve_global_dir = PH_SIEVE_DIR
    sieve_global_path = PH_GLOBAL_SIEVE_FILE
    #sieve_before =
    #sieve_after =

    # The maximum number of redirect actions that can be performed during a
    # single script execution. The meaning of 0 differs based on your version.
    # For versions v0.3.0 and beyond this means that redirect is prohibited.
    # For older versions, however, this means that the number of redirects is
    # unlimited, so be careful.
    #sieve_max_redirects = 4
}

service quota-warning {
    executable = script PH_QUOTA_WARNING_SCRIPT
    unix_listener quota-warning {
        user = PH_QUOTA_WARNING_USER
        group = PH_QUOTA_WARNING_GROUP
        mode = 0660
    }
}

service dict {
    unix_listener dict {
        mode = 0660
        user = PH_SERVICE_DICT_USER
        group = PH_SERVICE_DICT_GROUP
    }
}

dict {
    #expire = db:/var/lib/dovecot/expire/expire.db
    quotadict = PH_DOVECOT_REALTIME_QUOTA_SQLTYPE:PH_DOVECOT_REALTIME_QUOTA_CONF
    acl = PH_DOVECOT_SHARE_FOLDER_SQLTYPE:PH_DOVECOT_SHARE_FOLDER_CONF
}

protocol lda {
    # Reference: http://wiki2.dovecot.org/LDA
    mail_plugins = $mail_plugins sieve autocreate
    auth_socket_path = /var/run/dovecot/auth-master
    log_path = /var/log/sieve.log
    lda_mailbox_autocreate = yes
    postmaster_address = root
}
protocol imap {
    mail_plugins = $mail_plugins imap_quota autocreate
    imap_client_workarounds = tb-extra-mailbox-sep

    # Maximum number of IMAP connections allowed for a user from each IP address.
    # NOTE: The username is compared case-sensitively.
    # Default is 10.
    # Increase it to avoid issue like below:
    # "Maximum number of concurrent IMAP connections exceeded"
    #mail_max_userip_connections = 20
}
protocol pop3 {
    mail_plugins = $mail_plugins
    pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
    pop3_uidl_format = %08Xu%08Xv

    # Maximum number of IMAP connections allowed for a user from each IP address.
    # NOTE: The username is compared case-sensitively.
    # Default is 10.
    #mail_max_userip_connections = 20
}

# Login processes. Refer to Dovecot wiki for more details:
# http://wiki2.dovecot.org/LoginProcess
service imap-login {
    service_count = 1

    # To avoid startup latency for new client connections, set process_min_avail
    # to higher than zero. That many idling processes are always kept around
    # waiting for new connections.
    #process_min_avail = 0

    # Process limit.
    # Increase it if you got similar error message in Dovecot log file:
    # 
    # "master: Warning: service(imap-login): process_limit (100) reached,
    # client connections are being dropped"
    #
    #process_limit = $default_process_limit
    process_limit = 500

    # vsz_limit should be fine at its default 64MB value
    #vsz_limit = 64M
}
service pop3-login {
    service_count = 1
}

namespace {
    type = private
    separator = /
    prefix =
    #location defaults to mail_location.
    inbox = yes
}

namespace {
    type = shared
    separator = /
    prefix = Shared/%%u/
    location = maildir:/%%Lh/Maildir/:INDEX=/%%Lh/Maildir/Shared/%%u
    # this namespace should handle its own subscriptions or not.
    subscriptions = yes
    list = children
}

# Public mailboxes.
# Refer to Dovecot wiki page for more details:
# http://wiki2.dovecot.org/SharedMailboxes/Public
#namespace {
#    type = public
#    separator = /
#    prefix = Public/
#
#    # CONTROL=: Mark this public folder as read-only mailbox
#    # INDEX=: Per-user \Seen flag
#    location = maildir:/var/vmail/public/:CONTROL=~/Maildir/public:INDEX=~/Maildir/public
#
#    # Allow users to subscribe to the public folders.
#    subscriptions = yes
#}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.