Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config help #12

Closed
DoctorOgg opened this issue Dec 27, 2014 · 12 comments

Comments

@DoctorOgg
Copy link

commented Dec 27, 2014

after reading your docs i could use some help, i would like to configure my dovecot install to use my openldap server for auth, and mail dir location

        "dovecot": {
            "packages":["imap","lmtp","sieve"],
            "conf": {
                "conf_files_mode": "00640",
                "disable_plaintext_auth": false,
                "ldap": {
                    "auth_bind": true,
                    "base": "dc=somedomain,dc=com",
                    "uris": "ldaps://ldap.somedomain.com:636"
                },
                "log_path": "syslog",
                "mail_location": "sdbox:/srv/vmail/%u/Maildir",
                "mail_privileged_group": "mail",
                "opt_mail_location": "maildir:/srv/vmail/%u/Maildir",
                "syslog_facility": "mail"
            },
            "conf_files_group": "dovecot",
            "protocols": {
                "imap": {},
                "lda": {}
            },
            "services": {
                "auth": {
                    "listeners": [
                        {
                            "unix:/var/spool/postfix/private/auth": {
                                "group": "postfix",
                                "mode": "0666",
                                "user": "postfix"
                            }
                        }
                    ]
                }
            }
        },

any suggestions would be helpful

@zuazo

This comment has been minimized.

Copy link
Owner

commented Dec 28, 2014

Hi @neallawson,

Please, can you paste the error or problem you found? I have not used LDAP with this cookbook but in theory it should work.

@zuazo zuazo added the question label Dec 28, 2014
@zuazo zuazo self-assigned this Dec 28, 2014
@DoctorOgg

This comment has been minimized.

Copy link
Author

commented Dec 31, 2014

was more of a question of working examples, since the documentation is rather sparse.

@zuazo

This comment has been minimized.

Copy link
Owner

commented Dec 31, 2014

OK @neallawson. I think I won't be able to help a lot because we don't use LDAP. At first glance, your json seems OK anyway.

I recommend you to read the LDAP configuration template. It has more detailed descriptions of each option. You can also check Dovecot official documentation about LDAP and the OpenLDAP Howto.

Either way, if you find an example that works, I would greatly appreciate you add me an example to the README or paste it here 😃

@DoctorOgg

This comment has been minimized.

Copy link
Author

commented Dec 31, 2014

if you have a working example json, for a different config that would be helpful. thanks for the other resources.

@zuazo

This comment has been minimized.

Copy link
Owner

commented Dec 31, 2014

In addition to the README examples, you can read the dovecot_test cookbook recipes. For a more complete real world working example, see the postfix-dovecot::dovecot recipe.

They are not in JSON, but I think they can help.

@DoctorOgg

This comment has been minimized.

Copy link
Author

commented Jan 11, 2015

i did look a those resources, and they were almost of no help, regardless of what i have tried, i can't get the cookbook to write out the ldap conf files,

default['dovecot']['conf_files']['ldap'] = %w(
dovecot-ldap.conf.ext
conf.d/auth-ldap.conf.ext
)

@zuazo

This comment has been minimized.

Copy link
Owner

commented Jan 12, 2015

@neallawson, to write those files node['dovecot']['auth']['ldap'] has to be a hash. But I think that's a bug, because it should check against node['dovecot']['conf']['ldap']['auth_bind'] instead.

I will try to look in more detail the next weekend because I have to read the LDAP documentation more carefully. Until then, try setting these attributes:

node.default['dovecot']['auth']['ldap']['passdb']['driver'] = 'ldap'
node.default['dovecot']['auth']['ldap']['passdb']['args'] = '/etc/dovecot/dovecot-ldap.conf.ext'
@DoctorOgg

This comment has been minimized.

Copy link
Author

commented Jan 13, 2015

i did try setting

node.default['dovecot']['auth']['ldap']['passdb']['driver'] = 'ldap'
node.default['dovecot']['auth']['ldap']['passdb']['args'] = '/etc/dovecot/dovecot-ldap.conf.ext'

however no joy..... Thanks for the suggestion.

@DoctorOgg

This comment has been minimized.

Copy link
Author

commented Jan 13, 2015

oddly node['dovecot']['conf']['ldap']['auth_bind'] was also set to "true"

@zuazo

This comment has been minimized.

Copy link
Owner

commented Jan 13, 2015

i did try setting

node.default['dovecot']['auth']['ldap']['passdb']['driver'] = 'ldap'
node.default['dovecot']['auth']['ldap']['passdb']['args'] = '/etc/dovecot/dovecot-ldap.conf.ext'

however no joy..... Thanks for the suggestion.

You mean that the LDAP config files are not created? Because I just tested it with test-kitchen and seems to be created 😞

root@ldap-ubuntu-1204:~# find /etc/dovecot/ -name '*ldap*' -ls
1046746    8 -rw-r-----   1 root     dovecot      5242 Jan 13 04:52 /etc/dovecot/dovecot-ldap.conf.ext
1046748    4 -rw-r--r--   1 root     dovecot       744 Jan 13 04:52 /etc/dovecot/conf.d/auth-ldap.conf.ext

The auth_bind option is ignored, so that is expected behavior.

@zuazo zuazo added the bug label Mar 31, 2015
@zuazo zuazo closed this in d93800b Mar 31, 2015
@zuazo

This comment has been minimized.

Copy link
Owner

commented Mar 31, 2015

Hi @neallawson,

Sorry for the delay. I improved LDAP support in master. You can see the recipe example used for test-kitchen.

@zuazo

This comment has been minimized.

Copy link
Owner

commented Apr 4, 2015

LDAP fix released in 2.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.