[Dovecot] help using sendmail LDA
I am stuck. I get nothing in the logs (about deliver). Sendmail complains about "User unknown". I am not sure I have my sendmail.mc configured right, can someone confirm or give me some sample config files that make use of Dovecot+LDAP and sendmail LDA?
Dovecot is running as root.
I am a little confused, so the auth-master is not even needed? (the whole socket listen {}, since I am using static userdb and the user information was already found at authentication/login)
Thank You!
# 20080102: /usr/local/dovecot/etc/dovecot.conf listen: *:143 ssl_disable: yes disable_plaintext_auth: no login_dir: /usr/local/dovecot/var/run/dovecot/login login_executable: /usr/local/dovecot/libexec/dovecot/imap-login login_log_format_elements: user=<%n@%d> method=%m rip=%r lip=%l %c login_max_connections: 64 max_mail_processes: 128 mail_location: maildir:~/Maildir mail_debug: yes auth default: verbose: yes debug: yes passdb: driver: ldap args: /usr/local/dovecot/etc/dovecot-ldap.conf userdb: driver: static args: uid=vmail gid=vmail home=/var/mail/apps/%d/%n socket: type: listen master: path: /var/run/dovecot-auth-master mode: 384 user: vmail group: vmail
My sendmail.mc file:
define(confFALLBACK_SMARTHOST',
mailhost$?m.$m$.')dnl
define(LOCAL_MAILER_PATH',
/usr/local/dovecot/libexec/dovecot/deliver')
define(LOCAL_MAILER_FLAGS',
DFMPhfnu9')
define(LOCAL_MAILER_ARGS',
deliver -d $u')
MAILER(local')dnl MAILER(
smtp')dnl
LOCAL_NET_CONFIG R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3
auth default: verbose: yes debug: yes passdb: driver: ldap args: /usr/local/dovecot/etc/dovecot-ldap.conf userdb: driver: static args: uid=vmail gid=vmail home=/var/mail/apps/%d/%n
This probably goes back to your other questions. I believe deliver uses the userdb stanzas (at least that is what I documented in my dovecot.conf).
Here is my working setup...
... dovecot.conf ...
passdb ldap { args = /etc/dovecot/dovecot-ldap-domains.conf }
userdb prefetch { }
# LDA requires the userdb stanzas
userdb ldap { args = /etc/dovecot/dovecot-ldap-domains.conf }
... dovecot-ldap-domains.conf ...
# User attributes are given in LDAP-name=dovecot-internal-name list. The # internal names are: # home: Home directory # mail: MAIL environment # system_user: System user name (for getting user's groups from /etc/group) # - For virtual users you don't want to use this, so this defaults to none. # uid: System user ID # gid: System group ID user_attrs = mailMessageStore=home,mail=system_user,,
# If you wish to avoid two LDAP lookups (passdb + userdb), you can use # userdb prefetch instead of userdb ldap in dovecot.conf. In that case you'll # also have to include user_attrs in pass_attrs field prefixed with "userdb_" # string. For example:
pass_attrs = mail=user,userPassword=password,mail=system_user,mail=userdb_user,mail=userdb_system_user,mailMessageStore=userdb_home,,
# You can use same UID and GID for all user accounts if you really want to. # If the UID/GID is still found from LDAP reply, it overrides these values. user_global_uid = 1500 user_global_gid = 1500
How does your sendmail.mc configuration look like?
I just tried and used ldap for userdb instead of static, and I was still getting the same thing. Sendmail keeps spitting out User unknown messages.
How does sendmail work when configured like this?
This doesn't look right: (does it?)
# grep Mlocal /etc/mail/sendmail.cf Mlocal, P=/usr/lib/mail.local, F=lsDFMAw5:/|@qPSXmnz9, S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL,
On Jan 4, 2008 8:40 PM, Jim Horner <jhorner@arinbe.com> wrote:
auth default: verbose: yes debug: yes passdb: driver: ldap args: /usr/local/dovecot/etc/dovecot-ldap.conf userdb: driver: static args: uid=vmail gid=vmail home=/var/mail/apps/%d/%n
This probably goes back to your other questions. I believe deliver uses the userdb stanzas (at least that is what I documented in my dovecot.conf).
Here is my working setup...
... dovecot.conf ...
passdb ldap { args = /etc/dovecot/dovecot-ldap-domains.conf }
userdb prefetch { }
# LDA requires the userdb stanzas
userdb ldap { args = /etc/dovecot/dovecot-ldap-domains.conf }
... dovecot-ldap-domains.conf ...
# User attributes are given in LDAP-name=dovecot-internal-name list. The # internal names are: # home: Home directory # mail: MAIL environment # system_user: System user name (for getting user's groups from /etc/group) # - For virtual users you don't want to use this, so this defaults to none. # uid: System user ID # gid: System group ID user_attrs = mailMessageStore=home,mail=system_user,,
# If you wish to avoid two LDAP lookups (passdb + userdb), you can use # userdb prefetch instead of userdb ldap in dovecot.conf. In that case you'll # also have to include user_attrs in pass_attrs field prefixed with "userdb_" # string. For example:
pass_attrs = mail=user,userPassword=password,mail=system_user,mail=userdb_user,mail=userdb_system_user,mailMessageStore=userdb_home,,
# You can use same UID and GID for all user accounts if you really want to. # If the UID/GID is still found from LDAP reply, it overrides these values. user_global_uid = 1500 user_global_gid = 1500
On Saturday 05 January 2008 00:06:21 Anil wrote:
How does sendmail work when configured like this?
# grep Mlocal /etc/mail/sendmail.cf Mlocal, P=/usr/lib/mail.local, F=lsDFMAw5:/|@qPSXmnz9, S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL,
My basic test is to run the following:
cat /etc/hosts | sudo /usr/local/libexec/dovecot/deliver -d jhorner@arinbe.com
If that doesn't work then dovecot configuration isn't right.
There is a sendmail wiki page:
http://wiki.dovecot.org/LDA/Sendmail
I can't help with sendmail all that much... I use postfix and call deliver like:
dovecot unix - n n - - pipe flags=DOR user=vuser:vuser argv=/usr/local/libexec/dovecot/deliver -d ${user}@${nexthop} -n -m ${extension}
and permissions on deliver set to run deliver as root.
-rwsr-x--- 1 root vuser deliver
participants (2)
-
Anil
-
Jim Horner