On Wed, Jan 29, 2014 at 12:31:06PM -0500, Wietse Venema wrote: > > mail from: sen...@foo.bar" > > rcpt to : "2...@domain.com", "3...@domain.com", "a...@domain.com" > > > > I want to > > > > "2...@domain.com" and "3...@domain.com" receive this mail. > > but not "a...@domain.com" > > This is what it looks like in SMTP, which requires ONE address > per RCPT TO command: > > MAIL FROM:<sen...@foo.bar> > 250 Sender OK > RCPT TO:<2...@domain.com> > 250 Recipient OK > RCPT TO:<3...@domain.com> > 250 Recipient OK > RCPT TO:<a...@domain.com> > 550 Recipient not accepted > > You can implement this with > > /etc/postfix/main.cf: > smtpd_recipient_restrictions = > permit_mynetworks > reject_unauth_destination > check_recipient_access hash:/etc/postfix/rcpt_access > > /etc/postfix/rcpt_access > a...@domain.com reject
To make this reject depend on the sender (if that's what the OP wants), the OP needs restriction classes. See: http://www.postfix.org/RESTRICTION_CLASS_README.html -- Viktor.