mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-28 02:15:56 +03:00
[GH-ISSUE #866] customizing LDAP auto mailbox creation #767
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#767
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maziyarpanahi on GitHub (Apr 29, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/866
Hello,
Where can I change the setting for auto mailbox creation when the user logs in for the first time instead of /srv/vmail/ldap/uid(ldap usernam) creates the mailbox in /srv/vmail/domainname/firstPartOfEmail(%n)?
I have tried dovecot-ldap.conf.ext and also 10-mail.conf to match them with the default format (../ldap/uid) but I still get the error that says it can't find the user in /srv/vmail/domain/%n
The only place that had an effect in this error was a MySQL config (dovecot-sql.conf.ext). But I still have to change the default LDAP mailbox creation path and parameters. My LDAP userName is not the same as the user's email address.
Details of error:
When user logs in for the first time it creates the mailbox in /srv/vmail/ldap/uid which is different that its email username without domain.
Many thanks.
@tonioo commented on GitHub (Apr 29, 2016):
Modoboa does not create mailboxes on the filesystem, dovecot does.
If you haven't modified the default configuration, the mailbox path is returned by the SQL query used with user_query in dovecot's configuration (http://modoboa.readthedocs.io/en/latest/integration/imap_and_smtp.html#mysql-users)
In your example, I don't understand where does the 'ldap' part come from...
@maziyarpanahi commented on GitHub (Apr 29, 2016):
Hi tonioo,
Thanks for your reply. Actually the /ldap part was coming from "dovecot-ldap.conf.ext" that I have set manually. I am trying to make this config as same as user_query (I don't want to change sql query). So I need to assign user's email address instead of LDAP username which is different in my LDAP:
Any chance you know how to get user's LDAP email address? If I can find the parameter for LDAP user's email address instead of %n it will match the user_query.
Many thanks again tonioo
@maziyarpanahi commented on GitHub (Apr 29, 2016):
Ok I have managed to get the email address on both mailBox creation and user_query.
Many thanks again tonioo
@tonioo commented on GitHub (Apr 29, 2016):
Nice! I was replying to you but you were faster than me :)
Could you paste a working example? So others can retrieve it if they need too?
Thanks!