Le 11/01/2011 10:48, Y G a écrit :
> I like this idea.
>
> Is this the right implementation?
>
> Thank you very much
>
> /etc/postfix/main.cf:
> -------------------
> smtpd_recipient_restrictions =
> reject_non_fqdn_recipient
> reject_non_fqdn_sender
> reject_unknown_sender_domain
> permit_mynetworks
> check_recipient_access hash:/etc/postfix/valid_users
> PREPEND X-Bad-Recipient: Yes
you can't do that. instead:
check_recipient_access pcre:/etc/postfix/rcpt_bad
rcpt_bad
/./ PREPEND blah blah
of course, make this come after "valid_users" check!
> ....
> permit
>
> header_checks = regexp:/etc/postfix/header_checks
>
> /etc/postfix/valid_users
> ---------------------------------
> [email protected] OK
> [email protected] OK
>
> /etc/postfix/header_checks
> ---------------------------------------
> /^X-Bad-Recipient: Yes$/ REJECT
>
> On Mon, Jan 10, 2011 at 11:30 AM, mouss <[email protected]> wrote:
>
>> Le 09/01/2011 15:01, Wietse Venema a écrit :
>>> yz1234:
>>>>
>>>> Hello,
>>>>
>>>> Is there a way to configure Postfix to reject the entire message
>>>> (multi-recipient) if one of its recipients is unauthorized or invalid?
>>>
>>> This is not implemented in Postfix. You may implement this with
>>> a Milter plugin-program.
>>>
>>> Wietse
>>
>> If OP can use check_recipient_access (instead of
>> reject_unlisted_recipient) then he can use PREPEND to add a header and
>> use header_checks to reject if header is found.
>>
>>
>>
>