I thought that was the issue, but when I try submitting via SMTP (using telnet as my test) it still doesn't work. I supply an invalid email and it still relays it to the relay server.
When I run postmap -q to test (with debug turned on) it logs everything in /var/log/maillog. But I don't see that same debug output when testing through telnet to the SMTP port. On Tue, Feb 12, 2013 at 5:17 PM, Wietse Venema <wie...@porcupine.org> wrote: > Matthew Ceroni: > > I am trying to setup the relay_recipient_maps option. > > > > I created my LDAP file (/etc/postfix/ldap-relay_recipients.cf) and > tested > > it using postmap -q. When a valid user is supplied it returns 0 and when > > not it returns 1. > > As documented this is used in the SMTP daemon to reject mail for > non-existent recipients. > > > However when I send an email (testing using the local command tool mail) > it > > doesn't seem to matter and the message is sent to the relay anyways. > > Local submission does not arrive via the SMTP daemon. Also, I wonder > what you want, Postfix returning an error status when you use the > "mail" command? How should such mail be returned to sender if it > never makes it into the mail system in the first place? > > Wietse >