feat: add mail/v2
This commit is contained in:
24
mail/v2/conf/dovecot/dovecot-sql-mysql.conf
Normal file
24
mail/v2/conf/dovecot/dovecot-sql-mysql.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
driver = mysql
|
||||
connect = host=dbserver dbname=postfix user=postfix password=password
|
||||
default_pass_scheme = MD5-CRYPT
|
||||
|
||||
user_query = \
|
||||
SELECT \
|
||||
'/var/mail/domains/%u/' as home, \
|
||||
'maildir:/var/mail/domains/%u/' as mail, \
|
||||
8 AS uid, \
|
||||
12 AS gid, \
|
||||
concat('dirsize:storage=', quota) AS quota \
|
||||
FROM mailbox \
|
||||
WHERE username = '%u' AND active = '1'
|
||||
|
||||
password_query = \
|
||||
SELECT \
|
||||
username as user, \
|
||||
password, \
|
||||
'/var/mail/domains/%u/' as userdb_home, \
|
||||
'maildir:/var/mail/domains/%u/' as userdb_mail, \
|
||||
8 as userdb_uid, \
|
||||
12 as userdb_gid \
|
||||
FROM mailbox \
|
||||
WHERE username = '%u' AND active = '1'
|
||||
23
mail/v2/conf/dovecot/dovecot-sql-pgsql.conf
Normal file
23
mail/v2/conf/dovecot/dovecot-sql-pgsql.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
driver = pgsql
|
||||
connect = host=dbserver dbname=postfix user=postgres password=psqlpass
|
||||
default_pass_scheme = MD5-CRYPT
|
||||
|
||||
user_query = \
|
||||
SELECT \
|
||||
'/var/mail/domains/%u/' as home, \
|
||||
'maildir:/var/mail/domains/%u/' as mail, \
|
||||
8 as uid, \
|
||||
12 as gid, \
|
||||
'dirsize:storage=' || quota AS quota \
|
||||
FROM mailbox \
|
||||
WHERE username = '%u' AND active = true
|
||||
|
||||
password_query = SELECT \
|
||||
username AS user, \
|
||||
password, \
|
||||
8 as userdb_uid, \
|
||||
12 as userdb_gid, \
|
||||
'/var/mail/domains/' || maildir AS userdb_home, \
|
||||
'/var/mail/domains/' || maildir AS userdb_mail \
|
||||
FROM mailbox \
|
||||
WHERE username = '%u' AND active = true
|
||||
87
mail/v2/conf/dovecot/dovecot.conf
Normal file
87
mail/v2/conf/dovecot/dovecot.conf
Normal file
@@ -0,0 +1,87 @@
|
||||
# debug
|
||||
auth_debug = yes
|
||||
auth_debug_passwords = yes
|
||||
mail_debug = yes
|
||||
|
||||
first_valid_uid = 8
|
||||
#last_valid_uid = 8
|
||||
postmaster_address = admin@example.com
|
||||
protocols = "imap lmtp"
|
||||
auth_mechanisms = plain login
|
||||
|
||||
disable_plaintext_auth = no
|
||||
|
||||
mail_location = maildir:/var/lib/vmail/%d/%n
|
||||
#mail_location = maildir:/var/mail/domains/%u/
|
||||
mail_gid = mail
|
||||
mail_uid = mail
|
||||
|
||||
namespace inbox {
|
||||
inbox = yes
|
||||
location =
|
||||
mailbox Drafts {
|
||||
special_use = \Drafts
|
||||
}
|
||||
mailbox Junk {
|
||||
special_use = \Junk
|
||||
}
|
||||
mailbox Sent {
|
||||
special_use = \Sent
|
||||
}
|
||||
mailbox "Sent Messages" {
|
||||
special_use = \Sent
|
||||
}
|
||||
mailbox Trash {
|
||||
special_use = \Trash
|
||||
}
|
||||
prefix =
|
||||
}
|
||||
|
||||
passdb {
|
||||
driver = sql
|
||||
args = /etc/dovecot/dovecot-sql-pgsql.conf
|
||||
}
|
||||
|
||||
userdb {
|
||||
driver = sql
|
||||
args = /etc/dovecot/dovecot-sql-pgsql.conf
|
||||
}
|
||||
|
||||
|
||||
service auth {
|
||||
# Postfix smtp-auth
|
||||
inet_listener {
|
||||
port = 50026
|
||||
#mode = 0660
|
||||
#user = mail
|
||||
#group = mail
|
||||
}
|
||||
}
|
||||
|
||||
service imap {
|
||||
executable = imap
|
||||
}
|
||||
|
||||
service lmtp {
|
||||
|
||||
executable = lmtp -L
|
||||
process_min_avail = 5
|
||||
|
||||
inet_listener lmtp {
|
||||
port = 50024
|
||||
#user = mail
|
||||
#process_min_avail = 5
|
||||
#mode = 0600
|
||||
#user = mail
|
||||
#group = mail
|
||||
}
|
||||
}
|
||||
|
||||
#ssl_cert = </etc/ssl/dovecot/server.pem
|
||||
#ssl_cipher_list = ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
|
||||
#ssl_dh_parameters_length = 2048
|
||||
#ssl_key = </etc/ssl/dovecot/server.key
|
||||
#ssl_prefer_server_ciphers = yes
|
||||
#ssl_min_protocol = TLSv1.2
|
||||
|
||||
log_path = /var/log/dovecot.log
|
||||
Reference in New Issue
Block a user