I had a mail server blow up on me last night, Hard drive is completely dead.
Someone else configured this whole system and the part that died (email storage, IMAP and POP for most of the domains) is the part I knew the least about. I know it was authenticating against our LDAP server, as are the inbound routing server and the outbound SMTP server. So I quickly grabbed the most recent server CD I had handy (Ubuntu 8.10) and installed Postfix, and Dovecot.
I found some tutorials on LDAP, Postfix and Dovecot and tried to modify them to match our existing LDAP schema (I'd rather not be trying to re-configure the remaining servers.)
I think I'm close but I'm still getting
I'm guessing I screwed up the configuration somewhere (possibly multiple places) but I can't figure out where.
Any help would be VERY much appreciated (I've been up for 30 hours now)
dovecot.conf
dovecot-ldap.conf
Someone else configured this whole system and the part that died (email storage, IMAP and POP for most of the domains) is the part I knew the least about. I know it was authenticating against our LDAP server, as are the inbound routing server and the outbound SMTP server. So I quickly grabbed the most recent server CD I had handy (Ubuntu 8.10) and installed Postfix, and Dovecot.
I found some tutorials on LDAP, Postfix and Dovecot and tried to modify them to match our existing LDAP schema (I'd rather not be trying to re-configure the remaining servers.)
I think I'm close but I'm still getting
in mail.log and in dovecot.log I getInternal login failure (auth failed, 1 attempts): user=
User <user>@<domain> is missing UID
I'm guessing I screwed up the configuration somewhere (possibly multiple places) but I can't figure out where.
Any help would be VERY much appreciated (I've been up for 30 hours now)
dovecot.conf
auth_verbose = yes
mail_debug = yes
auth_debug=yes
base_dir = /var/run/dovecot/
protocols = imap imaps pop3 pop3s
protocol lda {
postmaster_address = postmaster@<domain>
auth_socket_path = /var/run/dovecot/auth-master
log_path = /var/log/dovecot-deliver.log
info_log_path = /var/log/dovecot-deliver.log
}
listen = *
shutdown_clients = yes
log_path = /var/log/dovecot.log
info_log_path = /var/log/mail.log
log_timestamp = "%b %d %H:%M:%S "
syslog_facility = mail
disable_plaintext_auth = no
ssl_disable = yes
login_chroot = yes
login_user = postfix
login_process_per_connection = yes
login_processes_count = 2
login_max_processes_count = 128
login_max_connections = 256
login_greeting = Email server
login_log_format_elements = user=<%n> domain=<%d> method=%m rip=%r lip=%l %c
login_log_format = %$: %s
mail_location = maildir:/home/vmail/domains/%d/%u
first_valid_uid = 107 # REMEBER THIS MUST BE CHANGED TO YOUR UID FOR "postfix" FROM /etc/passwd
pop3_uidl_format = %08Xu%08Xv
auth default {
mechanisms = PLAIN LOGIN
passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
userdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
socket listen {
master {
path = /var/run/dovecot/auth-master
mode = 0600
user = vmail
group = vmail
}
client {
path = /var/spool/postfix/private/auth
mode = 0660
user = postfix
group = postfix
}
}
user = vmail
}
dovecot-ldap.conf
hosts = 10.50.0.47
auth_bind = yes
auth_bind_userdn = uid=%n,ou=%d,ou=MailAuth,dc=extantsolutions,dc=net
ldap_version = 3
base = uid=%n,ou=%d,ou=MailAuth,dc=extantsolutions,dc=net
dn = cn=<adminuser>,dc=extantsolutions,dc=net
user_attrs = uid userPassword
dnpass = <adminpassword>
deref = never
scope = subtree
user_filter = (&(uid=%n))
pass_filter = (&(uid=%n))
default_pass_scheme = LDAP-MD5
pass_attrs = uid=user, userPassword=password
userdb static {
args = uid=vmail gid=vmail
}