On 10/2/2009 3:59 PM, K K wrote:
Hi all,

are there any possibilities to check multiple recipients based on
check_recipient_access restriction ? I mean, I would like to
reject mails from concrete sender to(concrete) multiple recipients,
for example sent mail from b...@example.com <mailto:b...@example.com> to
j...@example.com <mailto:j...@example.com>
copy to e...@example.com <mailto:e...@example.com> will be rejected, but
mail sent to individuals will be allowed.

I tried to do it with restrtiction classes as follows:

smtpd_sender_restrtiction = check_sender_access
hash:/etc/postfix/check_sender,permit_mynetworks,...

smtpd_restriction_classes = checkfirst, checksecond
checkfirst = check_recipient_access hash:/etc/postfix/checkfirst
checksecond = check_recipient_access hash:/etc/postfix/checksecond


/etc/postfix/check_sender
b...@example.com <mailto:b...@example.com>    checkfirst

/etc/postfix/checkfirst
j...@example.com <mailto:j...@example.com>    checksecond

/etc/postfix/checksecond
e...@example.com <mailto:e...@example.com>    REJECT


But I think it cannot be used check_recipient_access two times
for one mail...because when I changed the checksecond class
check_recipient_access with check_client_access, it worked.

Any ideas?

thanx a lot

Chris

No, you can't use check_recipient_access to check for multiple recipients. Each check is against a single recipient address, previous recipients are not available.

You can do this in a policy service that tracks recipients by using the "instance" attribute. See:
http://www.postfix.org/SMTPD_POLICY_README.html

There may be a milter with such a feature.  Maybe MIMEDefang?
https://www.milter.org/
http://www.mimedefang.org/


  -- Noel Jones

Reply via email to