On Tue, Apr 21, 2015 at 11:34 AM, Simon <grem...@gmail.com> wrote:

>
>
> On Mon, Apr 20, 2015 at 3:51 PM, Noel Jones <njo...@megan.vbhcs.org>
> wrote:
>
> On 4/19/2015 7:03 PM, Simon wrote:
>> > Hi There,
>> >
>> > We are using postfix 2.7.1 on debian. Is there a simple way to block
>> > emails from a domain or From address only to a certain to address?
>> > So this would match both from and to in the header to then block the
>> > email. e.g.
>> >
>> > From: blockt...@domain.com <mailto:blockt...@domain.com>
>> > To: cli...@theirdomain.com <mailto:cli...@theirdomain.com>
>> >
>> > Only when blockt...@domain.com <mailto:blockt...@domain.com> sent an
>> > email to  cli...@theirdomain.com <mailto:cli...@theirdomain.com>
>> > would it get blocked, otherwise all other emails from
>> >  blockt...@domain.com <mailto:blockt...@domain.com> would be sent to
>> > any other to address?
>>
>> You can use  a restriction class to block mail for a specific
>> envelope sender/recipient combination.  The envelope addresses are
>> what are logged by postfix, and may be different than what is in the
>> From: and To: headers.
>> http://www.postfix.org/RESTRICTION_CLASS_README.html
>>
>> If you must use the addresses listed in message headers, you will
>> need a content filter such as SpamAssassin.
>>
>
> Thanks for the reply here - I think that envelope sender/recipient
> combination would be fine :)
>
> I get the basic idea of the the restriction classes, but finding it
> difficult to figure out how to combine to get the result we need. Would you
> be able give me a head start on this one? It would be much appreciated!
>

Just to check on this one.. so am i correct that you would set a
restriction class for the inbound domain (say mailfrom.blockme.com), then
you would set a access list for that "class"? e.g. within that class block
if the recipient is cleanu...@client.com?

Simon

Reply via email to