I am having problems setting up Postfix with LDAP. I have a valid OpenLDAP database with users that I would like to have mailboxes.
The problem is that I get this error when I send mail to all users besides the root/postmaster/etc. mailboxes: ------------------------------------------------------------------------------------------------------------------------------------ #< #5.1.1 X-Postfix; unknown user: "username<sbiswas9...@students.wesleyseminary.edu>"> #SMTP# ------------------------------------------------------------------------------------------------------------------------------------ Eash user entry looks like the following: ------------------------------------------------------------------------------------------------------------------------------------ dn: cn=[[Username]],ou=Students,dc=wesleyseminary,dc=edu uid: [[Username]] displayName: Full Name of Person givenName: First Name objectClass: top objectClass: person objectClass: inetOrgPerson objectClass: organizationalPerson objectClass: mailUser employeeNumber: Internal Person ID sn: Last Name cn: [[Username]] userPassword: User Password mail: [[usernam...@students.wesleyseminary.edu maildrop: /home/studentemail/students.wesleyseminary.edu/[[Username]] ------------------------------------------------------------------------------------------------------------------------------------ My "main.cf" file looks like this: ------------------------------------------------------------------------------------------------------------------------------------ queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = //usr/lib64/postfix data_directory = /var/lib/postfix mail_owner = postfix myhostname = wts-zimbra.wesleysem.edu mydomain = wts-zimbra.wesleysem.edu inet_interfaces = all mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain local_recipient_maps = proxy:unix:passwd.byname $alias_maps unknown_local_recipient_reject_code = 550 mynetworks_style = subnet smtpd_banner = $virtual_mailbox_domains ESMTP $mail_name - Wesley Theological Seminary Email System - Postfix System - Version: ($mail_version) local_destination_concurrency_limit = 2 default_destination_concurrency_limit = 20 debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = postdrop html_directory = /usr/share/doc/postfix-2.6.6/html manpage_directory = /usr/share/man sample_directory = /etc/postfix readme_directory = /usr/share/doc/postfix-2.6.6/readme home_mailbox = .Maildir/ alias_maps = hash:/etc/mail/aliases studentemail-gid = 1000 studentemail-uid = 1000 virtual_transport = virtual virtual_mailbox_domains = /etc/postfix/virtual_domains.cf virtual_alias_maps = ldap:/etc/postfix/ldap-alias.cf virtual_mailbox_maps = ldap:/etc/postfix/ldap-maps.cf virtual_gid_maps = static:$studentemail-gid virtual_uid_maps = static:$studentemail-uid virtual_mailbox_base = /home/studentemail/ virtual_minimum_uid = 1000 smtpd_sasl_auth_enable = yes smtpd_sasl2_auth_enable = yes smtpd_sasl_security_options = noanonymous broken_sasl_auth_clients = yes smtpd_sasl_local_domain = smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination smtp_use_tls = yes smtp_tls_note_starttls_offer = yes smtpd_use_tls = yes # smtpd_tls_auth_only = yes smtpd_tls_key_file = /etc/postfix/newkey.pem smtpd_tls_cert_file = /etc/postfix/newcert.pem smtpd_tls_CAfile = /etc/postfix/cacert.pem smtpd_tls_loglevel = 3 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom ------------------------------------------------------------------------------------------------------------------------------------ The "studentemail" account exists and the home directory for that account exists. Now, here is my ldap-alias.cf file: ------------------------------------------------------------------------------------------------------------------------------------ server_host = current server host search_base = ou=Students,dc=wesleyseminary,dc=edu version=3 timeout = 10 size_limit = 1 bind = yes bind_dn = correct bind dn bind_pw = password query_filter = (mail=%s) result_attribute = cn ------------------------------------------------------------------------------------------------------------------------------------ And my ldap-map.cf file: ------------------------------------------------------------------------------------------------------------------------------------ server_host = current server host search_base = ou=Students,dc=wesleyseminary,dc=edu version=3 timeout = 10 size_limit = 1 bind = yes bind_dn = correct bind dn bind_pw = password query_filter = (mail=%s) result_attribute = maildrop ------------------------------------------------------------------------------------------------------------------------------------ What do I need to fix or change to get this working? As a side question, do the directories need to exist for the users first? Or does Postfix create those directories for me? Thank you for your time. Regards, Christopher Koeber