EXIM block emails from/to domain: различия между версиями

Материал из Webko Wiki
Перейти к навигации Перейти к поиску
(Новая страница: «Категория:Mail vim /etc/mail/exim.conf //--// domainlist exim_blacklist = lsearch;/etc/mail/exim_blacklist //--// begin routers discard: dr…»)
 
 
Строка 23: Строка 23:
 
Список доменов
 
Список доменов
 
  vim /etc/mail/exim_blacklist
 
  vim /etc/mail/exim_blacklist
 +
 +
== from countries ==
 +
 +
acl_check_rcpt:
 +
 +
# перед countries.nerd.dk обозначение зоны, соответствеющее какой нужно стране (cn, jp, vn...) и почта с IP адресов этой страны блокируется.
 +
#deny message = "Host in blacklist - $dnslist_domain \n $dnslist_text"
 +
deny message = Something with mail.
 +
dnslists = cn.countries.nerd.dk
 +
# Пропустим востребованные
 +
hosts = ! 12.21.45.25 : 54.21.69.24/24 : !
 +
log_message = Host in blacklist - "cn" Китай
 +
 +
deny message = Something with mail.
 +
dnslists = br.countries.nerd.dk
 +
log_message = Host in blacklist - "br" Бразилия
 +
 +
deny message = Something with mail.
 +
dnslists = ar.countries.nerd.dk
 +
log_message = Host in blacklist - "ar" Argentina
 +
 +
deny message = Something with mail.
 +
dnslists = vn.countries.nerd.dk
 +
log_message = Host in blacklist - "vn" Вьетнам
 +
 +
deny message = Something with mail.
 +
dnslists = th.countries.nerd.dk
 +
log_message = Host in blacklist - "th" Тайланд
 +
 +
deny message = Something with mail.
 +
dnslists = la.countries.nerd.dk
 +
log_message = Host in blacklist - "la" Лаос
 +
 +
deny message = Something with mail.
 +
dnslists = kh.countries.nerd.dk
 +
log_message = Host in blacklist - "kh" Камбоджа
 +
 +
deny message = Something with mail.
 +
dnslists = tr.countries.nerd.dk
 +
log_message = Host in blacklist - "tr" Турция
 +
 +
deny message = Something with mail.
 +
dnslists = in.countries.nerd.dk
 +
log_message = Host in blacklist - "in" Индия
 +
 +
deny message = Something with mail.
 +
dnslists = lk.countries.nerd.dk
 +
log_message = Host in blacklist - "lk" Шри-Ланка

Текущая версия на 23:30, 19 января 2016


vim /etc/mail/exim.conf
//--//
domainlist exim_blacklist = lsearch;/etc/mail/exim_blacklist
//--//
begin routers
discard:
 driver = redirect
 domains = +exim_blacklist
 data = :blackhole:

reject_domains:
 driver = redirect
 # blocked by admin
 domains = +exim_blacklist
 allow_fail
 data = :fail: Connection rejected: *.ru source $domain is manually blacklisted.
//--//


Список доменов

vim /etc/mail/exim_blacklist

from countries

acl_check_rcpt:

# перед countries.nerd.dk обозначение зоны, соответствеющее какой нужно стране (cn, jp, vn...) и почта с IP адресов этой страны блокируется.
#deny message = "Host in blacklist - $dnslist_domain \n $dnslist_text"
deny message = Something with mail.
dnslists = cn.countries.nerd.dk
# Пропустим востребованные
hosts = ! 12.21.45.25 : 54.21.69.24/24 : !
log_message = Host in blacklist - "cn" Китай

deny message = Something with mail.
dnslists = br.countries.nerd.dk
log_message = Host in blacklist - "br" Бразилия

deny message = Something with mail.
dnslists = ar.countries.nerd.dk
log_message = Host in blacklist - "ar" Argentina

deny message = Something with mail.
dnslists = vn.countries.nerd.dk
log_message = Host in blacklist - "vn" Вьетнам

deny message = Something with mail.
dnslists = th.countries.nerd.dk
log_message = Host in blacklist - "th" Тайланд

deny message = Something with mail.
dnslists = la.countries.nerd.dk
log_message = Host in blacklist - "la" Лаос

deny message = Something with mail.
dnslists = kh.countries.nerd.dk
log_message = Host in blacklist - "kh" Камбоджа

deny message = Something with mail.
dnslists = tr.countries.nerd.dk
log_message = Host in blacklist - "tr" Турция

deny message = Something with mail.
dnslists = in.countries.nerd.dk
log_message = Host in blacklist - "in" Индия

deny message = Something with mail.
dnslists = lk.countries.nerd.dk
log_message = Host in blacklist - "lk" Шри-Ланка