环境

Debian 11 Bullseye/sid

安装

官方文档比较详细,建议参考:https://docs.iredmail.org/index.html

特殊事项

1、邮件附件大小更改,文档:https://docs.iredmail.org/change.mail.attachment.size.html

2、SSL证书,采用自签证书

3、对接域控,对接域控邮箱字段 ProxyAddresses (此处为特殊情况,默认非此字段,默认字段已被外部邮箱使用),参考文档:https://docs.iredmail.org/active.directory.html

其中特殊相关配置文件如下:

/etc/postfix/ad_sender_login_maps.cf

server_host     = IP地址
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = sync_iredmail
bind_pw         = 密码
search_base     = ou=组织单位,dc=yudelei,dc=com
scope           = sub
query_filter    = (&(proxyAddresses=%s)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
result_attribute= proxyAddresses
debuglevel      = 0

/etc/postfix/ad_virtual_mailbox_maps.cf

server_host     = IP地址
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = sync_iredmail
bind_pw         = 密码
search_base     = ou=组织单位,dc=yudelei,dc=com
scope           = sub
query_filter    = (&(objectclass=person)(proxyAddresses=%s))
result_attribute= proxyAddresses
result_format   = %d/%u/Maildir/
debuglevel      = 0

/etc/postfix/ad_virtual_group_maps.cf

server_host     = IP地址
server_port     = 389
version         = 3
bind            = yes
start_tls       = no
bind_dn         = sync_iredmail
bind_pw         = 密码
search_base     = ou=组织单位,dc=yudelei,dc=com
scope           = sub
query_filter    = (&(objectClass=group)(mail=%s))
special_result_attribute = member
result_attribute= proxyAddresses
debuglevel      = 0

/etc/dovecot/dovecot-ldap.conf

hosts           = IP地址:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=sync_iredmail,cn=users,dc=yudelei,dc=com
dnpass          = 密码
base            = ou=组织单位,dc=yudelei,dc=com
scope           = subtree
deref           = never
debuglevel      = 0
 
iterate_attrs   = proxyAddresses=user
iterate_filter  = (&(proxyAddresses=*)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
 
user_filter     = (&(proxyAddresses=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_filter     = (&(proxyAddresses=%u)(objectClass=person)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))
pass_attrs      = userPassword=password
default_pass_scheme = CRYPT
user_attrs      = mail=master_user,mail=user,=home=/data/vmail/vmail1/%Ld/%Ln/,=mail=maildir:~/Maildir/

/etc/postfix/transport

mail.yudelei.com dovecot
* error:禁止向其他域发送邮件!You cannot send mail to other domains!

postmap hash:/etc/postfix/transport
systemctl reload postfix

最后修改:2023 年 01 月 31 日 04 : 16 PM
如果觉得文章帮助了您,您可以随意赞赏。