On 11/5/2010 8:32 AM, Christoph Pleger wrote:
Hello,

I want to configure postfix so that mails to u...@localhost and
u...@host.subdomain.domain are only accepted if the mail origins from
an IP address in $mynetworks, but that mails to u...@subdomain.domain
are always accepted. How can I do that?

Regards
   Christoph


Use a check_recipient_access map somewhere after permit_mynetworks. Basic example:

# main.cf
smtpd_recipient_restrictions =
  permit_mynetworks
  reject_unauth_destination
  check_recipient_access hash:/etc/postfix/restricted_receipt


# restricted_receipt
localhost.my.domain  REJECT some message
localhost  REJECT local use only
sub.my.domain  REJECT for local use only


Be sure to "postmap restricted_receipt" after editing it. Be sure to run "postfix reload" after editing main.cf.



  -- Noel Jones

Reply via email to