Kod: Zaznacz cały
#------------------------------------------------------------------------------------------------------
# DEBUG
#------------------------------------------------------------------------------------------------------
log_path = /var/log/dovecot.log
mail_debug = yes
auth_verbose = yes
auth_verbose_passwords = sha1
auth_debug = yes
auth_debug_passwords = yes
verbose_ssl = yes
log_timestamp = "%Y-%m-%d %H:%M:%S"
#debugowanie SSL mail_debug = no
#------------------------------------------------------------------------------------------------------
# USTAWIENIA OGOLNE
#------------------------------------------------------------------------------------------------------
listen = *
login_greeting = xxx.pl
# message for clients
mail_uid = 8
mail_gid = 8
first_valid_uid = 8
last_valid_uid = 8
mail_plugins = "quota"
mail_location = maildir:~
namespace inbox {
# skrzynka INBOX
inbox = yes
location = maildir:~
}
#------------------------------------------------------------------------------------------------------
# PROTOKOŁY i UPRAWNIENIA
#------------------------------------------------------------------------------------------------------
mail_privileged_group = mail
mail_access_groups = mail
protocols = imap lmtp
protocol imap {
mail_plugins = quota imap_quota autocreate
}
protocol pop3 {
mail_plugins = quota autocreate
}
protocol lda {
# mail_plugins = sieve quota
# postmaster_address = postmaster@xxx.pl
}
plugin {
quota = maildir:User quota
quota_rule1 = Trash:storage=100M
quota_warning = storage=90%% quota-warning 90 %u
}
plugin {
autocreate = Trash
autocreate2 = Sent
autosubscribe = Trash
autosubscribe2 = Sent
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix
mode = 0600
user = postfix
}
}
protocol lmtp {
postmaster_address=postmaster@xxx.pl
hostname=10.10.10.20
}
service auth {
unix_listener auth-userdb {
user = mail
group = mail
mode = 0604
}
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user=postfix
group=mail
}
}
service auth-worker {
unix_listener auth-worker {
user = mail
group = mail
mode = 660
}
}
#----------------------------------------------------------------------------------------------------
# Quota
# ---------------------------------------------------------------------------------------------------
plugin {
quota_grace = 10%%
# 10% is the default
quota_status_success = DUNNO
quota_status_nouser = DUNNO
quota_status_overquota = "552 5.2.2 Mailbox is full"
quota_warning = storage=95%% quota-warning 95 %u
quota_warning2 = storage=80%% quota-warning 80 %u
quota_warning3 = -storage=100%% quota-warning below %u # user is no longer over quota
quota_exceeded_message = </path/to/dovecot/quota_exceeded_message.txt
}
service quota-warning {
executable = script /usr/local/bin/quota-warning.sh
user = mail
unix_listener quota-warning {
}
}
service quota-status {
executable = quota-status -p postfix
inet_listener {
port = 12340
# You can choose any port you want
}
client_limit = 1
}
#----------------------------------------------------------------------------------------------------
# LDAP
# ----------------------------------------------------------------------------------------------------
passdb {
driver = sql
args = /path/to/dovecot/dovecot-sql.conf
}
userdb {
driver = sql
args = /path/to/dovecot/dovecot-sql.conf
}
#----------------------------------------------------------------------------------------------------
# SSL
#----------------------------------------------------------------------------------------------------
disable_plaintext_auth = yes
ssl=yes
ssl = required
ssl_cert = < /path/to/cert/mail.pem
ssl_key = < /path/to/cert/mail.key
ssl_key_password = ""