Mailinglist Archive: opensuse (4498 mails)
| < Previous | Next > |
Re: [SLE] How do I block certain senders in Postfix?
- From: Jim Flanagan <linuxjim@xxxxxxxxxx>
- Date: Wed, 1 Nov 2006 15:03:18 +0000 (UTC)
- Message-id: <4548B72B.4020307@xxxxxxxxxx>
Sandy Drobic wrote:
> Jim Flanagan wrote:
>> Further to my post a few weeks or so ago, how do I block emails from
>> being accepted by postfix. The emails in particular are from one of 2
>> different IP addresses. I suppose I could block only those 2, or
>> perhaps the entire range if need be.
>>
>> I read a bit on this in the docs, but am unsure if I should make a
>> "hash" for it, or use canonical, and if so, how.
>
> It doesn't really matter what type of lookup table you are using as
> long as your version of postfix knows how to handle the type.
>
> "postconf -m" shows all supported lookup table types.
>
>> I do have a hash for check_recipient_access which is working great.
>> But I don't know how to block a particular IP address for a sender.
>
> Careful, "sender" in Postfix terms is the sender address in the smtp
> envelope in the MAIL FROM command. If you want to check the hostname
> or ip address of the sending server, use check_client_access.
>
>>
>> I'm running Suse 10.0, mostly standard postfix. Many thanks for any
>> pointers.
>
> check_recipient_restrictions =
> permit_mynetworks,
> permit_sasl_authenticated,
> reject_unauth_destination,
> check_client_access hash:/etc/postfix/client_blacklist
>
> /etc/postfix/client_blacklist:
> 1.2.3.4 554 rejected host due to amount of spam!
>
> This example does not work if the sending client is in $mynetworks.
> Execute "postmap hash:/etc/postfix/client_blacklist" each time you
> edit the source file /etc/postfix/client_blacklist.
> Execute "postfix reload" each time you edit main.cf or master.cf.
>
> Sandy
I don't know if it is proper to start a new thread on this, or follow up
on this old one, so I'll try the follow up first.
I did as you indicated above, and that seems to be working fine. Would
it also be correct to reject a block of IP numbers in the format of
1.2.3.4-5.6.7.8?? It this correct?
Many thanks again,
Jim F
> Jim Flanagan wrote:
>> Further to my post a few weeks or so ago, how do I block emails from
>> being accepted by postfix. The emails in particular are from one of 2
>> different IP addresses. I suppose I could block only those 2, or
>> perhaps the entire range if need be.
>>
>> I read a bit on this in the docs, but am unsure if I should make a
>> "hash" for it, or use canonical, and if so, how.
>
> It doesn't really matter what type of lookup table you are using as
> long as your version of postfix knows how to handle the type.
>
> "postconf -m" shows all supported lookup table types.
>
>> I do have a hash for check_recipient_access which is working great.
>> But I don't know how to block a particular IP address for a sender.
>
> Careful, "sender" in Postfix terms is the sender address in the smtp
> envelope in the MAIL FROM command. If you want to check the hostname
> or ip address of the sending server, use check_client_access.
>
>>
>> I'm running Suse 10.0, mostly standard postfix. Many thanks for any
>> pointers.
>
> check_recipient_restrictions =
> permit_mynetworks,
> permit_sasl_authenticated,
> reject_unauth_destination,
> check_client_access hash:/etc/postfix/client_blacklist
>
> /etc/postfix/client_blacklist:
> 1.2.3.4 554 rejected host due to amount of spam!
>
> This example does not work if the sending client is in $mynetworks.
> Execute "postmap hash:/etc/postfix/client_blacklist" each time you
> edit the source file /etc/postfix/client_blacklist.
> Execute "postfix reload" each time you edit main.cf or master.cf.
>
> Sandy
I don't know if it is proper to start a new thread on this, or follow up
on this old one, so I'll try the follow up first.
I did as you indicated above, and that seems to be working fine. Would
it also be correct to reject a block of IP numbers in the format of
1.2.3.4-5.6.7.8?? It this correct?
Many thanks again,
Jim F
| < Previous | Next > |