EXIM. Отключить отправку сообщений об ошибках

EXIM, sendmail, postfix, Dovecot и прочие. Решение проблем связанных с работой электронной почты

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
VVEBER
проходил мимо
Сообщения: 7
Зарегистрирован: 2008-03-25 8:48:05

EXIM. Отключить отправку сообщений об ошибках

Непрочитанное сообщение VVEBER » 2009-01-26 7:50:59

Добрый день. Exim с конфигурацией Лиссяры и накрученным dspam. Используется релей провайдера для отправки исходящей почты. Вчера админы провайдера перестали принимать от нашего сервера письма по причине "с вас летит очень много отлупов, в черный список". Я так понимаю, произошло это потому как exim, откидывая спаммеров и проч. генерит сообщение об ошибке, и пытается его заслать через этот самый релей. Как отучить его это делать ?

ACL'ы:

Код: Выделить всё

begin acl


acl_check_rcpt:


 accept  hosts = :

 deny    message       = "incorrect symbol in address"
          domains       =  * : +local_domains
          local_parts   = ^[.] : ^.*[@%!/|]

 deny    message       = "incorrect symbol in address"
          domains       = !+local_domains
          local_parts   = ^[./] : ^.*[@%!|] : ^.*/\\.\\./


 deny    message       = "HELO/EHLO require by SMTP RFC"
          condition     = ${if eq{$sender_helo_name}{}{yes}{no}}

 accept  authenticated = *

   
 deny     message       = "Your IP in HELO - access denied!"
          hosts         =  * : !+relay_from_hosts :
          condition     = ${if eq{$sender_helo_name} {$sender_host_address}{true}{false}}

 deny    message       = "Your IP in HELO - access denied!"
          hosts         =  * : !+relay_from_hosts :
          condition     = ${if eq{$sender_helo_name} {[$sender_host_address]}{true}{false}}


  deny    condition     = ${if eq{$sender_helo_name} {$interface_address}{yes}{no}}
          hosts         = !127.0.0.1 : *
          message       = "main IP in your HELO! Access denied!"

  deny    condition     = ${if match{$sender_helo_name} {\N^(\d+\.){3}\d+$\N}{yes}{no}}
          hosts         = !127.0.0.1 : *
          message       = "can not be only number in HELO!"

  deny    condition     = ${if match{$sender_helo_name} {com.au|net.au|bigpond|broadband|dynamic|adsl|dialup|pool|peer|dhcp|pppoe|dsl|dul|ppp|comcast|localhost}{yes}{no}}
          hosts         = !127.0.0.1 : *
          message       = "We don't accepting trash in HELO! Access denied!"


  deny    condition     = ${if eq{$sender_address}{}{yes}{no}}
          hosts         = !127.0.0.1 : *
          message       = "б ЛБЛПЗП HELO РХУФПЕ?! оЕ РП RFC..."


  deny    condition     = ${if match{$sender_address}{\N^\s+$\N}{yes}{no}}
          hosts         = !127.0.0.1 : *
          message       = "rejected"

  deny    condition     = ${if eq{$sender_address}{}{yes}{no}}
          hosts         = !127.0.0.1 : *
          message       = "Where sender of this mail?!"

  deny	condition	= ${if match{$sender_address}{msn|search}{yes}{no}}
	hosts		= *
	message		= "Microsoft is not allowed here!"		

  deny    message       = "your hostname is bad (adsl, poll, ppp & etc)."
          condition     = ${if match{$sender_host_name} {net.au|com.au|bigpond|broadband|dynamic|adsl|dialup|pool|peer|dhcp|pppoe|dsl|dul|ppp|comcast} {yes}{no}}


  warn
        set acl_m0 = 60s
  warn
        hosts = +relay_from_hosts:
        set acl_m0 = 0s
  warn
        logwrite = Delay $acl_m0 for $sender_host_name [$sender_host_address] with HELO=$sender_helo_name. Mail from $sender_address to $local_part@$domain.
        delay = $acl_m0

                          
  accept  domains       = +local_domains
          endpass
          message       = "In my mailserver not stored this user"
          verify        = recipient

  accept  domains       = +relay_to_domains
          endpass
          message       = "main server not know how relay to this address"
          verify        = recipient

  deny    message       = "you in blacklist - $dnslist_domain \n $dnslist_text"
          dnslists      = sbl.spamhaus.org : bl.spamcop.net : cbl.abuseat.org : opm.blitzed.org : bl.csma.biz : dynablock.njabl.org

  deny    message   = "Unknown Sender" 
          !verify  = sender/callout=postmaster,100s
       
  deny hosts    = *
       senders  = ! :
       message  = Domain is listed in $dnslist_domain.
       dnslists = \
       bogusmx.rfc-ignorant.org/$sender_address_domain : \
       dsn.rfc-ignorant.org/$sender_address_domain : \
       postmaster.rfc-ignorant.org/$sender_address_domain  

  accept  hosts         = +relay_from_hosts

  deny    message       = "Homo hominus lupus est"


Конфиг (роутеры и транспорты):

Код: Выделить всё


send_to_gateway:
    driver = manualroute
    domains = !+local_domains
    transport = remote_smtp
    route_list = * relay.tomsknet.ru
	    
dspam_addspam_router:
  driver = accept
  domains                      = +local_domains
  local_part_prefix = spam-
  transport = dspam_addspam_transport

dspam_notspam_router:
  driver = accept
  domains                      = +local_domains
  local_part_prefix = notspam-
  transport = dspam_notspam_transport

dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
  no_more

system_aliases:
    driver      = redirect
    allow_fail
    allow_defer
    data = ${lookup mysql{SELECT `goto` FROM `alias` WHERE `address`='${quote_mysql:$local_part@$domain}' OR `address`='${quote_mysql:@$domain}'}}

copy_message:
   driver = redirect
   unseen
   domains = +local_domains : !+local_domains
  
dspam_spamscan_router:
  driver = accept
  domains                      = +local_domains
  no_verify
  condition = "${if and {{!eq {$received_protocol}{spam-scanned}} \
  		{!eq {$received_protocol}{local}} } {1}{0}}"
  transport = dspam_spamcheck_transport
  require_files = /usr/local/bin/dspam
  address_test = false

local_delivery_spam_router:
  driver                       = accept
  domains                      = +local_domains
  condition                    = ${if match{$h_X-DSPAM-Result:}{Spam}}
  transport                    = local_delivery_spam_transport
  no_more

dovecot_user:
  driver = accept
  condition = ${lookup mysql{SELECT `goto` FROM `alias` WHERE `address`='${quote_mysql:$local_part@$domain}' OR `address`='${quote_mysql:@$domain}'}{yes}{no}}
  transport = dovecot_delivery

	
begin transports

dspam_addspam_transport:
  driver = pipe
  command = "/usr/local/bin/dspam --user \
		$local_part@$domain --class=spam --source=error"
  return_path_add = false
  return_fail_output = true
  log_output = true
  home_directory = "/var/db/dspam"
  current_directory = "/var/db/dspam"
  user = mailnull
  group = mail

dspam_notspam_transport:
  driver = pipe
  command = "/usr/local/bin/dspam --user \
		$local_part@$domain --class=innocent \
		--source=error --deliver=innocent %u"
  return_path_add = false
  return_fail_output = true
  log_output = true
  home_directory = "/var/db/dspam"
  current_directory = "/var/db/dspam"
  user = mailnull
  group = mail

dspam_spamcheck_transport:
  driver = pipe
  command = /usr/local/bin/dspam --deliver=innocent \
  		--user "$local_part@$domain" -- %u
  user = mailnull
  group = mail
  return_path_add = false
  log_output = true
  return_fail_output = true
  headers_remove        = X-DSPAM-Result


local_delivery_spam_transport:
  driver = pipe
  command = /usr/local/libexec/dovecot/deliver -d $local_part@$domain
  message_prefix = SPAM 
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
  log_output
  user = mailnull


remote_smtp:
  driver = smtp

dovecot_delivery:
  driver = pipe
  command = /usr/local/libexec/dovecot/deliver -d $local_part@$domain
  message_prefix =
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
  log_output
  user = mailnull

address_pipe:
  driver = pipe
  return_output

address_reply:
  driver = autoreply


begin retry

*                    *       F,2h,15m; G,16h,1h,1.5; F,4d,6h

Спасибо!

Хостинговая компания Host-Food.ru
Хостинг HostFood.ru
 

Услуги хостинговой компании Host-Food.ru

Хостинг HostFood.ru

Тарифы на хостинг в России, от 12 рублей: https://www.host-food.ru/tariffs/hosting/
Тарифы на виртуальные сервера (VPS/VDS/KVM) в РФ, от 189 руб.: https://www.host-food.ru/tariffs/virtualny-server-vps/
Выделенные сервера, Россия, Москва, от 2000 рублей (HP Proliant G5, Intel Xeon E5430 (2.66GHz, Quad-Core, 12Mb), 8Gb RAM, 2x300Gb SAS HDD, P400i, 512Mb, BBU):
https://www.host-food.ru/tariffs/vydelennyi-server-ds/
Недорогие домены в популярных зонах: https://www.host-food.ru/domains/

Аватара пользователя
Alex Keda
стреляли...
Сообщения: 35411
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Re: EXIM. Отключить отправку сообщений об ошибках

Непрочитанное сообщение Alex Keda » 2009-01-26 10:13:59

отправить их все в /dev/null

Код: Выделить всё

# дропаем рикошеты... достали
bounce_to_null:
        driver          = redirect
        condition       = ${if eq{$sender_address}{}{yes}{no}}
        user            = mailnull
        group           = mail
        file_transport  = address_file
        pipe_transport  = address_pipe
        data            = null@hosting.lissyara.su
        domains         = ! +local_domains
первым роутером.
Убей их всех! Бог потом рассортирует...