Thanks all for the previous help getting postfix up and running with ldap / tls.. Finally after I don't even know how many build attempts, ,it's up and running :)

My setup is all mail is delivered from a mail host to my postfix from another server. They do ldap lookups which is working fine. I'd like to though just use the ldap also for the postfix delivery - right now I have both /etc/postfix/aliases and the ldap. So when I add an alias, I add it both places.

All mail is delivered to one mailbox, pretty much all aliases.

In my LDAP, I have my 'account' with the entries under the mail attribute (ali...@espphotography.com ali...@espphotography.com, etc)..

A lookup of say testtest:

postmap -q testt...@espphotography.com ldap:/etc/postfix/ldap-aliases.cf
returns everything - a big long string of all the aliases I have.

A test e-mail is rejected:

Jul  9 12:25:57 www postfix/smtpd[1507]: connect from example.com[1.2.3.4]
Jul 9 12:25:58 www postfix/smtpd[1507]: AF0E22DD758: client=example.com[1.2.3.4] Jul 9 12:25:59 www postfix/cleanup[1510]: AF0E22DD758: message-id=<4a564420.8090...@example.com> Jul 9 12:25:59 www postfix/qmgr[1334]: AF0E22DD758: from=<e...@example.com>, size=2351, nrcpt=1 (queue active) Jul 9 12:25:59 www postfix/local[1511]: AF0E22DD758: to=<testt...@espphotography.com>, relay=local, delay=0.49, delays=0.44/0.02/0/0.03, dsn=5.1.1, status=bounced (unknown user: "testtest") Jul 9 12:25:59 www postfix/cleanup[1510]: 127492DD75A: message-id=<20090709192559.127492dd...@espphotography.com> Jul 9 12:25:59 www postfix/qmgr[1334]: 127492DD75A: from=<>, size=4191, nrcpt=1 (queue active) Jul 9 12:25:59 www postfix/bounce[1512]: AF0E22DD758: sender non-delivery notification: 127492DD75A
Jul  9 12:25:59 www postfix/qmgr[1334]: AF0E22DD758: removed
Jul 9 12:26:00 www postfix/smtp[1513]: 127492DD75A: to=<e...@example.com>, relay=smtp.comcast.net[76.96.62.117]:587, delay=1.5, delays=0.01/0.03/0.66/0.78, dsn=2.0.0, status=sent (250 2.0.0 DvTE1c0073FUpeY3evTEZS mail accepted for delivery)

My mail host does a ldap lookup prior to delivery, so ldap is working, but postfix doesn't like it...

Any suggestions as to what I'm missing or what's wrong? Info below... Thanks again. :)

# cat /etc/postfix/ldap-aliases.cf
server_host = 127.0.0.1
server_port = 389
search_base = uid=eplatt, dc=espphotography, dc=com
query_filter = mail=%s
result_attribute = mail
version = 3
bind = no


# postconf -n
alias_maps = hash:/etc/postfix/aliases, ldap:/etc/postfix/ldap-aliases.cf
biff = no
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 10000000
mydomain = espphotography.com
myhostname = espphotography.com
mynetworks = 168.100.189.0/28, 127.0.0.0/8,192.168.1.0/28,206.176.229.254,216.200.134.0/24,192.168.1.0/24
mynetworks_style = subnet
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
relayhost = [smtp.comcast.net]:587
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpass
smtp_sasl_security_options =
smtpd_client_event_limit_exceptions = static:everyone
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/access
smtpd_tls_cert_file = /System/Library/OpenSSL/certs/smtpd.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550


Reply via email to