Jump to content
Sign in to follow this  
el_jot

Blokowanie Spamu W Sendamil-u Za Pomocą 'black Lists'

Recommended Posts

Uzupełniłem konfigurację sendmail-a o zalecane wpisy zawarte na kilku serwerach z czarnymi listami. Odpowiednie wpisy do pliku sendmail.cf znalazły się po przetworzeniu pod nagłówkiem

 

######################################################################

### Relay_ok: is the relay/sender ok?

######################################################################

SRelay_ok

# anything originating locally is ok

# check IP address

R$* $: $&{client_addr}

[email protected] [email protected] RELAY originated locally

R0 [email protected] RELAY originated locally

R$=R $* [email protected] RELAY relayable IP address

R$* $: [ $1 ] put brackets around it...

R$=w [email protected] RELAY ... and see if it is local

 

 

# check client name: first: did it resolve?

R$* $: < $&{client_resolve} >

R<TEMP> $#TEMP [email protected] 4.7.1 $: "450 Relaying temporarily denied. Cannot resolve PTR record for " $&{client_addr}

R<FORGED> $#error [email protected] 5.7.1 $: "550 Relaying denied. IP name possibly forged " $&{client_name}

R<FAIL> $#error [email protected] 5.7.1 $: "550 Relaying denied. IP name lookup failed " $&{client_name}

R$* $: <@> $&{client_name}

R<@> [email protected] RELAY

# pass to name server to make hostname canonical

R<@> $* $=P $:<?> $1 $2

R<@> $+ $:<?> $[ $1 $]

R$* . $1 strip trailing dots

R<?> $=w [email protected] RELAY

R<?> $* $=R [email protected] RELAY

 

# DNS based IP address spam list dnsbl.sorbs.net

R$* $: $&{client_addr}

R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1.dnsbl.sorbs.net. $: OK $)

R<?>OK $: OKSOFAR

R<?>$+<TMP> $: TMPOK

R<?>$+ $#error [email protected] 5.7.1 $: "554 Rejected " $&{client_addr} " found in dnsbl.sorbs.net"

 

# DNS based IP address spam list bl.spamcop.net

R$* $: $&{client_addr}

R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1.bl.spamcop.net. $: OK $)

R<?>OK $: OKSOFAR

R<?>$+<TMP> $: TMPOK

R<?>$+ $#error [email protected] 5.7.1 $: "Spam_blocked see: http://spamcop.net/bl.shtml?"$&{client_addr}

 

# DNS based IP address spam list relays.ordb.org

R$* $: $&{client_addr}

R$-.$-.$-.$- $: <?> $(dnsbl $4.$3.$2.$1.relays.ordb.org. $: OK $)

R<?>OK $: OKSOFAR

R<?>$+<TMP> $: TMPOK

R<?>$+ $#error [email protected] 5.7.1 $: "550_Email rejected - see http://www.ordb.org/faq/\#why_rejected"

 

Wpisy dodane do obsługi blacklists pogrubiłem. Sendmail działa jako relay dla wewnętrznego właściwego serwera poczty i uruchamia się na tym pliku konfiguracyjnym bez błędów. Niestety, nie widzę efektów działania tych wpisów np w maillog-u nie mówiąc o ilości spamu, który jest na stałym poziomie. Jak można sprawdzić czy te wpisy działają ? A może filtrowanie na podstawie blacklists nie działa dla funkcji relay lub kolejność wpisów jest niewłaściwa ?

 

el_jot

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...