OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Strange behaviour of postfix and openldap

From: - Cygnus - (cygnuzzyahoo.com.sg)
Date: Mon Apr 09 2007 - 07:08:26 CDT


Dear all members,

I experienced odd behaviour for transport maps of postfix integrated
with LDAP. If I use LDAP database for domain transport, when I tried
send email to user of the domain example.com, the mail will continuously
loop , and not deliver mail to virtually to mailbox. But if I define the
transport in cdb format, postmap the file, and after that the email sent
to example.com will successfully deliver to mailbox. Here is my postconf
output

command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
local_recipient_maps = unix:passwd.byname $alias_maps $virtual_mailbox_maps
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = example.com
myhostname = mail.example.com
mynetworks = xxx.xxx.xxx.xxx/22, 127.0.0.0/8
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = ldap:/etc/postfix/domain
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated
permit_mynetworks reject_unknown_sender_domain
reject_non_fqdn_sender reject_non_fqdn_recipient
reject_unauth_destination check_policy_service inet:127.0.0.1:12525
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/example.crt
smtpd_tls_key_file = /etc/ssl/example.key
smtpd_use_tls = yes
#transport_maps = cdb:/etc/postfix/transport
transport_maps = ldap:/etc/postfix/transportmaps
unknown_local_recipient_reject_code = 550
virtual_alias_maps = ldap:/etc/postfix/accountsmap
virtual_gid_maps = static:125
virtual_mailbox_base = /mailbox
virtual_mailbox_domains = ldap:/etc/postfix/domain
virtual_mailbox_limit_maps = ldap:/etc/postfix/quota
virtual_mailbox_maps = ldap:/etc/postfix/account
virtual_transport = virtual
virtual_uid_maps = static:125

## transportmaps
server_host = localhost
search_base = o=hosting,dc=myhosting,dc=email
query_filter =
(&(jvd=%s)(objectClass=JammVirtualDomain)(accountActive=TRUE))
result_attribute = postfixTransport
bind = no
scope = one

postfixTransport : virtual

I use jamm schema for LDAP database tree.

--
- Cygnus -