Edit Postfix config :
vim /etc/postfix/ldap-aliases.cf
bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
special_result_filter = %s@%d
vim /etc/postfix/ldap-users.cf
bind = no
version = 3
timeout = 20
size_limit = 1
expansion_limit = 0
start_tls = no
tls_require_cert = no
server_host = ldap://192.9.18.25
search_base = ou=Groups,dc=server,dc=co,dc=id
scope = sub
query_filter = (mail=%s)
result_attribute = mgrpDeliverTo
vim /etc/postfix/main.cf
myhostname = jinsvr6.jst.co.id
myorigin = jst.co.id
inet_interface = all
mydestination = jst.co.id
virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf
local_recipient_maps = $alias_maps, ldap:/etc/postfix/ldap-users.cf
unknown_local_recipient_reject_code = 550
mynetworks =127.0.0.0/28, 192.9.18.0/24, 192.9.19.0/24
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
smtpd_recipient_restrictions = reject_unauth_destination
#smtpd_client_recipient_rate_limit = 25
#always_bcc = rizki@jst.co.id
relay_domains = jst.com.sg
transport_maps = hash:/etc/postfix/transport
Edit dovecot config :
vim /etc/dovecot/dovecot.conf
protocols = imap pop3
listen = *
mail_location = maildir:~/Maildir
ssl=no
disable_plaintext_auth=no
auth_mechanisms = plain
passdb {
driver=ldap
args = /etc/dovecot/dovecot-ldap.conf
}
userdb {
driver=ldap
args = /etc/dovecot/dovecot-ldap.conf
}
vim /etc/dovecot/dovecot-ldap.conf
hosts = 192.9.18.25
dn ="cn=Directory Manager"
dnpass = "12345678"
ldap_version = 3
base = dc=server,dc=co,dc=id
deref = never
scope = subtree
user_filter = (&(objectClass=mailgroup) (mgrpDeliverTo=%u))
pass_filter = (&(objectClass=posixAccount) (uid=%u))
default_pass_scheme = CRYPT
No comments:
Post a Comment