postfix config to deliver to local users only

Hi, My postfix-fu is failing me on this one. I am trying to set up postfix so that it only delivers to local users. The local users can exist in /etc/aliases or in the ldap-aliases postmap. However, the resolved email addresses in ldap can be from many different domains so I cannot filter by domain. All non-deliverable mail should either be discarded (via the postfix discard agent) or sent to a catch-all devnull address (e.g. devnull: /dev/null in /etc/aliases) I previously had this working with sendmail but I cannot seem to replicate this with postfix. I have tried transport maps /etc/postfix/transport domain.tld local: * discard: but this discards the ldap-resolved recipient address if it is outside the domain domain.tld (which most are). I have also tried with e.g. luser_relay = devnull@localhost without luck. Any other ideas? Thanks, Marcus. -- Marcus Furlong

Marcus Furlong <furlongm@gmail.com> writes:
I previously had this working with sendmail but I cannot seem to replicate this with postfix. I have tried transport maps
/etc/postfix/transport domain.tld local: * discard:
but this discards the ldap-resolved recipient address if it is outside the domain domain.tld (which most are).
I thought you had to explicitly tell postfix which domains it was the endpoint for ($my_domains, IIRC). Anything not in that, postfix goes "well this isn't me, so I'd better pass it along". What does your typical ldap object look like? My RFC2307 ones don't have a mail address in them at all, they're just normal unix accounts and thus uid=fred,ou=people,o=cyber just means fred@<any of $my_domains> gets delivered. I guess you have virtual (i.e. email only, no shell access) objects in LDAP, but I haven't done that so I dunno what they look like. I can also recommend #postfix on irc.freenode.net.
participants (2)
-
Marcus Furlong
-
trentbuck@gmail.com