一次知识。您能回答我的一个问题吗?
drwsrws--T 4 vmail vmail 4096 Mar 14 17:15 .
drwxr-xr-x 16 vmail vmail 4096 Mar 14 13:15 ..
drwxrws--T 4 vmail vmail 4096 Mar 14 17:11 fzela.com
drwxrws--T 3 vmail vmail 4096 Mar 14 17:15 fzmail.com
我想要像上面的邮箱结构,其中fzela.com和fzmail.com是包含根目录和内部域权限的域,例如fzela.com,我想要这样的用户权限
drwxrws--T 4 vmail vmail 4096 Mar 14 17:11 .
drwsrws--T 4 vmail vmail 4096 Mar 14 17:15 ..
drwx--S--- 3 fzinnus123.fzela vmail 4096 Mar 14 17:10 fzinnus123
drwx--S--- 3 fzinnus123.fzela vmail 4096 Mar 14 17:11 fzsaran123
其中fzinnus123和fzsaran123是fzela.com域的用户 我尝试了很多,但无法解决我正在使用虚拟用户的情况 使用MySQL MariaDB。
我曾经尝试过这样的dovecot.conf
###
### activated protocols
#############################
protocols = imap lmtp sieve
###
### TLS configuration
#######################
ssl = required
ssl_cert = </etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_key = </etc/ssl/private/ssl-cert-snakeoil.key
ssl_cipher_list = EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA
ssl_prefer_server_ciphers = yes
###
### Dovecot services
################################
service imap-login {
inet_listener imap {
port = 143
}
}
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0660
group = postfix
user = postfix
}
#group=vmail
}
service auth {
### Auth socket für Postfix
unix_listener /var/spool/postfix/private/auth {
mode = 0660
user = postfix
group = postfix
}
### Auth socket für LMTP-Dienst
unix_listener auth-userdb {
mode = 0660
user =
group =
}
}
###
### Protocol settings
#############################
protocol imap {
mail_plugins = $mail_plugins quota imap_quota imap_sieve
mail_max_userip_connections = 20
imap_idle_notify_interval = 29 mins
}
protocol lmtp {
postmaster_address = postmaster@localhost
mail_plugins = $mail_plugins sieve
}
###
### Client authentication
#############################
disable_plaintext_auth = yes
auth_mechanisms = plain login
passdb {
driver = sql
args =/etc/dovecot/dovecot-sql.conf
}
userdb {
driver = static
args = uid=fzinnus123.fzela.com gid=vmail home=/var/vmail/%d/%n/Maildir
##/etc/dovecot/dovecot-sql.conf
}
###
### Mail location
#######################
first_valid_gid=0
#mail_uid = 8
#mail_gid = 12
mail_privileged_group = vmail
mbox_write_locks = fcntl
mail_location = maildir:/var/vmail/%d/%n/Maildir
#mail_access_groups = vmail
###
### Mailbox configuration
########################################
namespace inbox {
inbox = yes
mailbox Spam {
auto = subscribe
special_use = \Junk
}
mailbox Trash {
auto = subscribe
special_use = \Trash
}
mailbox Drafts {
auto = subscribe
special_use = \Drafts
}
mailbox Sent {
auto = subscribe
special_use = \Sent
}
}
###
### Mail plugins
############################
plugin {
sieve_plugins = sieve_imapsieve sieve_extprograms
sieve_before = /var/vmail/sieve/global/spam-global.sieve
sieve = file:/var/vmail/sieve/%d/%n/scripts;active=/var/vmail/sieve/%d/%n/active-script.sieve
###
### Spam learning
###
# From elsewhere to Spam folder
imapsieve_mailbox1_name = Spam
imapsieve_mailbox1_causes = COPY
imapsieve_mailbox1_before = file:/var/vmail/sieve/global/learn-spam.sieve
# From Spam folder to elsewhere
imapsieve_mailbox2_name = *
imapsieve_mailbox2_from = Spam
imapsieve_mailbox2_causes = COPY
imapsieve_mailbox2_before = file:/var/vmail/sieve/global/learn-ham.sieve
sieve_pipe_bin_dir = /usr/bin
sieve_global_extensions = +vnd.dovecot.pipe
quota = maildir:User quota
quota_exceeded_message = Benutzer %u hat das Speichervolumen überschritten. / User %u has exhausted allowed storage space.
}