Hi, I have a simple virtual domain setup (s/my.do.main/example.com/g). I'm running 2.11.6 on a FreeBSD 10.1 release, from the ports repository.
$ postconf -n command_directory = /usr/local/sbin config_directory = /usr/local/etc/postfix daemon_directory = /usr/local/libexec/postfix data_directory = /var/db/postfix 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 html_directory = /usr/local/share/doc/postfix inet_protocols = ipv4 mail_owner = postfix mailq_path = /usr/local/bin/mailq manpage_directory = /usr/local/man myorigin = example.com newaliases_path = /usr/local/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/local/share/doc/postfix sample_directory = /etc/postfix sendmail_path = /usr/local/sbin/sendmail setgid_group = postdrop unknown_local_recipient_reject_code = 550 virtual_alias_maps = ldap:/usr/local/etc/postfix/example.com-groups.cf ldap:/usr/local/etc/postfix/example.com-users.cf virtual_mailbox_domains = example.com virtual_mailbox_maps = hash:/usr/local/etc/postfix/virtual-example.com.net-mailbox virtual_transport = lmtp:unix:private/dovecot-lmtp $ cat virtual-example.com-mailbox j...@example.com OK LDAP lookup is fine, with recursive expansion for groups and uid/sAMAccountName lookup for valid recipient addresses: $ postmap -q nosuchrecipi...@example.com ldap:/usr/local/etc/postfix/example.com-groups.cf $ postmap -q nosuchrecipi...@example.com ldap:/usr/local/etc/postfix/example.com-users.cf $ postmap -q jeroen.scheer...@example.com ldap:/usr/local/etc/postfix/example.com-groups.cf $ postmap -q jeroen.scheer...@example.com ldap:/usr/local/etc/postfix/example.com-users.cf js Delivery is fine as well. Offering mail to any of my addresses results in lmtp delivery to the "js" mailbox: 2015-08-21T10:42:33.031301+02:00 <mail.info> ponyboy1b postfix/lmtp[7475]: D84F81AF11C: to=<j...@example.com>, relay=ponyboy1b.acct.example.com[private/dovecot-lmtp], delay=0.16, delays=0.04/0.02/0.02/0.08, dsn=2.0.0, status=sent (250 2.0.0 <j...@example.com> LViGOHjk1lU0HQAAYdfT9A Saved) 2015-08-21T10:42:33.031378+02:00 <mail.info> ponyboy1b dovecot: lmtp(j...@example.com): LViGOHjk1lU0HQAAYdfT9A: msgid=<20150821084232.d84f81af...@ponyboy1b.acct.example.com>: saved mail to INBOX However, mail to any nonexistant address results in delivery, even though the LDAP lookup failed: 2015-08-21T10:43:01.504741+02:00 <mail.info> ponyboy1b postfix/lmtp[7475]: 671E21AF14F: to=<nosuchrecipi...@example.com>, relay=ponyboy1b.acct.example.com[private/dovecot-lmtp], delay=0.09, delays=0.03/0.01/0/0.05, dsn=2.0.0, status=sent (250 2.0.0 <nosuchrecipi...@example.com> MliGOHjk1lU0HQAAYdfT9A Saved) 2015-08-21T10:43:01.504819+02:00 <mail.info> ponyboy1b dovecot: lmtp(nosuchrecipi...@example.com): MliGOHjk1lU0HQAAYdfT9A: msgid=<20150821084301.671e21af...@ponyboy1b.acct.example.com>: saved mail to INBOX Setting virtual_mailbox_domains or not, or its contents, seems to make no difference here. The LMTP process (dovecot) has a static userdb with "allow_all_users=yes", that rejects nothing; postfix should make the distinction between valid and invalid recipients here. I can add a static additional alias with an "@example.com" catchall in it, and either have that delivered or bounced. Workarounds aplenty. But I don't understand why mail to addresses for which the ldap lookup fails are delivered. I'm probably missing someone simple. Where am I going wrong? Regards, Jeroen. -- Jeroen Scheerder ON2IT B.V. Regterweistraat 7 4181 CE WAARDENBURG T: +31 88 22 66 200 | F: +31 88 22 66 299 W: www.on2it.net | E: jeroen.scheer...@on2it.net
signature.asc
Description: OpenPGP digital signature