Bogofilter and whitelist

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bogofilter and whitelist

Christos Chatzaras
I scan incoming mail with bogofilter. Here is the related part of master.cf :

smtp      inet  n       -       n       -       -       smtpd
  -o content_filter=filter:
  -o receive_override_options=no_address_mappings 
filter    unix  -       n       n       -       -       pipe
    flags=Rq user=filter argv=/usr/local/etc/bogofilter/postfix-filter.sh -f ${sender} -- ${recipient}   

Is it possible to not filter if sender IP is in list.dnswl.org using master.cf or main.cf ?

Or the only way is to rewrite postfix-filter.sh script and add the check there?
Reply | Threaded
Open this post in threaded view
|

Re: Bogofilter and whitelist

Wietse Venema
Christos Chatzaras:
> I scan incoming mail with bogofilter. Here is the related part of master.cf :
>
> smtp      inet  n       -       n       -       -       smtpd
>   -o content_filter=filter:
>   -o receive_override_options=no_address_mappings
> filter    unix  -       n       n       -       -       pipe
>     flags=Rq user=filter argv=/usr/local/etc/bogofilter/postfix-filter.sh -f ${sender} -- ${recipient}  
>
> Is it possible to not filter if sender IP is in list.dnswl.org <http://list.dnswl.org/> using master.cf or main.cf ?

Yes, remove the content_filter setting above, and use a check_client_access
with lookup table instead.

main.cf:
    smtpd_client_restrictions =
        permit_dnswl_client list.dnswl.org
        check_client_access static:{FILTER filter:}

This syntax is supported with Postfix 3.0 or later.

Or if you prefer in master.cf:

master.cf:
    smtp      inet  n       -       n       -       -       smtpd
       -o {
            smtpd_client_restrictions =
                permit_dnswl_client list.dnswl.org
                check_client_access static:{FILTER filter:}
        }

This syntax is supported with Postfix 3.0 or later.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Bogofilter and whitelist

Christos Chatzaras
Great. Thank you for your reply :-)


> On 19 Apr 2018, at 17:05, Wietse Venema <[hidden email]> wrote:
>
> Christos Chatzaras:
>> I scan incoming mail with bogofilter. Here is the related part of master.cf :
>>
>> smtp      inet  n       -       n       -       -       smtpd
>>  -o content_filter=filter:
>>  -o receive_override_options=no_address_mappings
>> filter    unix  -       n       n       -       -       pipe
>>    flags=Rq user=filter argv=/usr/local/etc/bogofilter/postfix-filter.sh -f ${sender} -- ${recipient}  
>>
>> Is it possible to not filter if sender IP is in list.dnswl.org <http://list.dnswl.org/> using master.cf or main.cf ?
>
> Yes, remove the content_filter setting above, and use a check_client_access
> with lookup table instead.
>
> main.cf:
>    smtpd_client_restrictions =
>        permit_dnswl_client list.dnswl.org
>        check_client_access static:{FILTER filter:}
>
> This syntax is supported with Postfix 3.0 or later.
>
> Or if you prefer in master.cf:
>
> master.cf:
>    smtp      inet  n       -       n       -       -       smtpd
>       -o {
>            smtpd_client_restrictions =
>                permit_dnswl_client list.dnswl.org
>                check_client_access static:{FILTER filter:}
>        }
>
> This syntax is supported with Postfix 3.0 or later.
>
>        Wietse