Topic: samba integration
Hi,
i have modified iredmail to use the same account for mail and samba :
for me it's working but as i have changed the dn , maybe need further testing :
in create_mail _user_OPENLDAP.sh , line 206 replace code with (remove the ldapadd up to EOF):
smbldap-useradd -a -m -c "${USERNAME}" ${USERNAME}
ldapmodify -x -D "${BINDDN}" -w "${BINDPW}" << EOF
dn: uid=${USERNAME},${OU_USER_DN},${DOMAIN_DN},${BASE_DN}
changetype: modify
add: objectClass
objectClass: mailUser
-
add: storageBaseDirectory
storageBaseDirectory: ${STORAGE_BASE_DIRECTORY}
-
replace: homeDirectory
homeDirectory: ${STORAGE_BASE_DIRECTORY}/${maildir}
-
add: accountStatus
accountStatus: active
-
add: mailMessageStore
mailMessageStore: ${maildir}
-
add: mail
mail: ${MAIL}
-
add: shadowAddress
shadowAddress: ${MAIL}
-
add: mailQuota
mailQuota: ${QUOTA}
-
add: userPassword
userPassword: ${PASSWD}
-
add: enabledService
enabledService: mail
enabledService: pop3
enabledService: pop3secured
enabledService: imap
enabledService: imapsecured
enabledService: managesieve
enabledService: managesievesecured
enabledService: smtp
enabledService: deliver
enabledService: forward
enabledService: senderbcc
enabledService: recipientbcc
enabledService: shadowaddress
enabledService: displayedInGlobalAddressBook
-
add: memberOfGroup
memberOfGroup: all@${DOMAIN_NAME}
EOF
use it with smbldap-tools and in smb.conf , OU is :
ldap suffix = domainName=<domain>,o=domains,dc=<base>,dc=<base>
instead of using dn as mail=<user>@domain.com, im using uid=<user>
please comment
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.