exim

Простые/общие вопросы по UNIX системам. Спросите здесь, если вы новичок

Модераторы: vadim64, terminus

Правила форума
Убедительная просьба юзать теги [cоde] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

exim

Непрочитанное сообщение DN » 2013-12-22 2:22:36

всем еще раз привет
знающие и опытные люди помогите пожалуйста решить проблем
начальство уже лишает премии
проблема в следующем приходит спам от самого себя же, да и вообще куча спама каждый день по 50-70 спама, в exime не спец
на форумах куча всякой инфы и не понятно где готовое рабочее решение как сделать авторизацию

спам приходит не смоего ip
конфиг exima

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

smtp_accept_max = 100
MAILMAN_HOME=/usr/local/mailman
MAILMAN_WRAP=MAILMAN_HOME/mail/mailman
MAILMAN_USER=mailnull
MAILMAN_GROUP=mail
MY_IP = 192.168.50.1
VIRTUAL_DOMAINS = SELECT DISTINCT domain FROM domains WHERE type = 'local' AND enabled = '1' AND domain = '${quote_mysql:$domain}'
RELAY_DOMAINS = SELECT DISTINCT domain FROM domains WHERE type = 'relay'  AND domain = '${quote_mysql:$domain}'
ALIAS_DOMAINS = SELECT DISTINCT alias FROM domainalias WHERE alias = '${quote_mysql:$domain}'
domainlist local_domains = @ : mydomain.ru : mydomain.ru : ${lookup mysql{VIRTUAL_DOMAINS}} : ${lookup mysql{ALIAS_DOMAINS}}
domainlist relay_to_domains = ${lookup mysql{RELAY_DOMAINS}}
hostlist   relay_from_hosts = localhost : 192.168.50.0/24 : MY_IP
trusted_users = www
hide mysql_servers = localhost::(/tmp/mysql.sock)/vexim/vexim/psnW31
acl_smtp_rcpt = acl_check_rcpt
acl_smtp_data = acl_check_content
acl_smtp_helo = acl_check_helo
av_scanner = clamd:/var/run/clamav/clamd.sock
spamd_address = 127.0.0.1 783
exim_user = mailnull
exim_group = mail
never_users = root
host_lookup = *
rfc1413_hosts = *
rfc1413_query_timeout = 0s
ignore_bounce_errors_after = 2d
timeout_frozen_after = 7d
log_selector = +all
begin acl
  .include /usr/local/etc/exim/vexim-acl-check-spf.conf
acl_check_helo:
  .include /usr/local/etc/exim/vexim-acl-check-helo.conf
acl_check_rcpt:
  .include /usr/local/etc/exim/vexim-acl-check-rcpt.conf
  deny    local_parts   = ^.*[@%!/|] : ^\\.
  accept  local_parts   = postmaster
          domains       = +local_domains
  require verify        = sender
  accept  domains       = +local_domains
          endpass
          verify        = recipient
  accept  domains       = +relay_to_domains
          endpass
          verify        = recipient
  accept  hosts         = +relay_from_hosts
  accept  authenticated = *
  deny    message       = relay not permitted
acl_check_content:
  .include /usr/local/etc/exim/vexim-acl-check-content.conf
  accept

begin routers
dnslookup:
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  no_more
mailman_router:
  driver = accept
  require_files = MAILMAN_HOME/lists/$local_part/config.pck
  local_part_suffix_optional
  local_part_suffix = -bounces : -bounces+* : \
                      -confirm+* : -join : -leave : \
                      -owner : -request : -admin
  headers_remove = X-Spam-Score:X-Spam-Report
  transport = mailman_transport
ditch_maxmsgsize:
  driver = redirect
  allow_fail
  condition = ${if >{$message_size}{${lookup mysql{select users.maxmsgsize from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.maxmsgsize > 0 \
                and users.domain_id=domains.domain_id }{${value}K}fail}} {yes}{no}}
  data = :fail:\n\Your message is too big.\n \
                Your message was rejected because the user $local_part@$domain\n \
                does not accept messages larger than \
                ${lookup mysql{select users.maxmsgsize from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.maxmsgsize > 0 \
                and users.domain_id=domains.domain_id}{${value}K}fail} Kb.
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
ditch_malware:
  driver = redirect
  allow_fail
  data = :blackhole:
  condition = ${if and { {match {$h_X-ACL-Warn:}{.*malware.*}} \
                         {eq {${lookup mysql{select users.on_avscan from users,domains \
                                where localpart = '${quote_mysql:$local_part}' \
                                and domain = '${quote_mysql:$domain}' \
                                and users.on_avscan = '1' \
                                and users.domain_id=domains.domain_id}}}{1} }} {yes}{no} }
ditch_hdrmailer:
  driver = redirect
  allow_fail
  data = :blackhole:
  condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
                        where blocklists.blockhdr = 'x-mailer' \
                        and blocklists.blockval = '${quote_mysql:$h_x-mailer:}' \
                        and users.localpart = '${quote_mysql:$local_part}' \
                        and domains.domain = '${quote_mysql:$domain}' \
                        and domains.domain_id=blocklists.domain_id \
                        and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
ditch_hdrto:
  driver = redirect
  allow_fail
  data = :blackhole:
  condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
                        where blocklists.blockhdr = 'to' \
                        and blocklists.blockval = '${quote_mysql:$h_to:}' \
                        and users.localpart = '${quote_mysql:$local_part}' \
                        and domains.domain = '${quote_mysql:$domain}' \
                        and domains.domain_id=blocklists.domain_id \
                        and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
ditch_hdrfrom:
  driver = redirect
  allow_fail
  data = :blackhole:
  condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
                        where blocklists.blockhdr = 'from' \
                        and blocklists.blockval = '${quote_mysql:$h_from:}' \
                        and users.localpart = '${quote_mysql:$local_part}' \
                        and domains.domain = '${quote_mysql:$domain}' \
                        and domains.domain_id=blocklists.domain_id \
                        and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
ditch_hdrsubject:
  driver = redirect
  allow_fail
  data = :blackhole:
  condition = ${if eq {${lookup mysql{select count(*) from blocklists,users,domains \
                        where blocklists.blockhdr = 'subject' \
                        and blocklists.blockval = '${quote_mysql:$h_subject:}' \
                        and users.localpart = '${quote_mysql:$local_part}' \
                        and domains.domain = '${quote_mysql:$domain}' \
                        and domains.domain_id=blocklists.domain_id \
                        and users.user_id=blocklists.user_id}}}{1} {yes}{no}}
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
virtual_vacation:
  driver = accept
  condition = ${if and { {!match {$h_precedence:}{(?i)junk|bulk|list}} \
                         {eq {${lookup mysql{select users.on_vacation from users,domains \
                                where localpart = '${quote_mysql:$local_part}' \
                                and domain = '${quote_mysql:$domain}' \
                                and users.on_vacation = '1' \
                                and users.domain_id=domains.domain_id}}}{1} }} {yes}{no} }
  no_verify
  no_expn
  unseen
  transport = virtual_vacation_delivery
virtual_forward:
  driver = redirect
  check_ancestor
  unseen = ${if eq {${lookup mysql{select unseen from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.on_forward = '1' \
                and users.domain_id=domains.domain_id}}}{1} {yes}{no}}
  data = ${lookup mysql{select forward from users,domains \
        where localpart='${quote_mysql:$local_part}' \
        and domain='${quote_mysql:$domain}' \
        and users.domain_id=domains.domain_id \
        and on_forward = '1'}}
  condition = ${if and { {!match {$h_precedence:}{(?i)junk}} \
                         {eq {${lookup mysql{select users.on_forward from users,domains \
                                where localpart = '${quote_mysql:$local_part}' \
                                and domain = '${quote_mysql:$domain}' \
                                and users.on_forward = '1' \
                                and users.domain_id=domains.domain_id}}}{1} }} {yes}{no} }

virtual_domains:
  driver = redirect
  allow_fail
  data = ${lookup mysql{select smtp from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and domains.enabled = '1' \
                and users.enabled = '1' \
                and users.domain_id = domains.domain_id}}
  headers_add = ${if >{$spam_score_int}{${lookup mysql{select users.sa_tag * 10 from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.on_spamassassin = '1' \
                and users.domain_id=domains.domain_id }{$value}fail}} {X-Spam-Flag: YES\n}{} }
  headers_remove = ${if or { { <{$spam_score_int}{1} } \
                             { <{$spam_score_int}{${lookup mysql{select users.sa_tag * 10 from users,domains \
                               where localpart = '${quote_mysql:$local_part}' \
                               and domain = '${quote_mysql:$domain}' \
                               and users.on_spamassassin = 1 \
                               and users.domain_id=domains.domain_id}{$value}fail}} } \
                             { eq {0}{${lookup mysql{select users.sa_tag * 10 from users,domains \
                               where localpart = '${quote_mysql:$local_part}' \
                               and domain = '${quote_mysql:$domain}' \
                               and users.on_spamassassin = 0 \
                               and users.domain_id=domains.domain_id}{$value}fail}}} \
                           } {X-Spam-Score:X-Spam-Report} }
  local_part_suffix = -*
  local_part_suffix_optional
  retry_use_local_part
  file_transport = virtual_delivery
  reply_transport = address_reply
  pipe_transport = address_pipe

.include /usr/local/etc/exim/vexim-group-router.conf
virtual_domains_catchall:
  driver = redirect
  allow_fail
  data = ${lookup mysql{select smtp from users,domains where localpart = '*' \
                and domain = '${quote_mysql:$domain}' \
                and users.domain_id = domains.domain_id}}
  retry_use_local_part
  file_transport = virtual_delivery
  reply_transport = address_reply
  pipe_transport = address_pipe_catchall
virtual_domain_alias:
  driver = redirect
  allow_fail
  data = ${lookup mysql{select concat('${quote_mysql:$local_part}@', domain) \
                from domains,domainalias where domainalias.alias = '${quote_mysql:$domain}' \
                and domainalias.domain_id = domains.domain_id}}
  retry_use_local_part

system_aliases:
  driver = redirect
  allow_fail
  allow_defer
  data = ${lookup{$local_part}lsearch{/etc/aliases}}
  user = mailnull
  group = mail
  file_transport = address_file
  pipe_transport = address_pipe
userforward:
  driver = redirect
  check_local_user
  file = $home/.forward
  no_verify
  no_expn
  check_ancestor
  file_transport = address_file
  pipe_transport = address_pipe_local
  reply_transport = address_reply
  condition = ${if exists{$home/.forward} {yes} {no} }
  group = mail
localuser:
  driver = accept
  check_local_user
  transport = local_delivery
  cannot_route_message = Unknown user
begin transports
remote_smtp:
  driver = smtp
local_delivery:
  driver = appendfile
  file = /var/mail/$local_part
  delivery_date_add
  envelope_to_add
  return_path_add
  group = mail
  user = $local_part
  mode = 0660
  no_mode_fail_narrower
virtual_delivery:
  driver = appendfile
  envelope_to_add
  return_path_add
  mode = 0600
  maildir_format = true
  create_directory = true
  directory = ${lookup mysql{select smtp from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.domain_id = domains.domain_id}}
  user = ${lookup mysql{select users.uid  from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.domain_id = domains.domain_id}}
  group = ${lookup mysql{select users.gid from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.domain_id = domains.domain_id}}
  quota = ${lookup mysql{select users.quota from users,domains \
                where localpart = '${quote_mysql:$local_part}' \
                and domain = '${quote_mysql:$domain}' \
                and users.domain_id = domains.domain_id}{${value}M}}
  quota_is_inclusive = false
  quota_warn_threshold = 75%
  maildir_use_size_file = false
  quota_warn_message = "To: $local_part@$domain\n\
                        Subject: Mailbox quota warning\n\n\
                        This message was automatically generated by the mail delivery software.\n\n\
                        You are now using over 75% of your allocated mail storage quota.\n\n\
                        If your mailbox fills completely, further incoming messages will be automatically\n\
                        returned to their senders.\n\n\
                        Please take note of this and remove unwanted mail from your mailbox.\n"
virtual_vacation_delivery:
  driver   = autoreply
  from     = "${local_part}@${domain}"
  to       = ${sender_address}
  subject  = "Autoreply from ${local_part}@${domain}"
  text     = ${lookup mysql{select vacation from users,domains \
                where domain='${quote_mysql:$domain}' \
                and localpart='${quote_mysql:$local_part}' \
                and users.domain_id=domains.domain_id}}
mailman_transport:
  driver = pipe
  command = MAILMAN_WRAP \
            '${if def:local_part_suffix \
                  {${sg{$local_part_suffix}{-(\\w+)(\\+.*)?}{\$1}}} \
                  {post}}' \
            $local_part
  current_directory = MAILMAN_HOME
  home_directory = MAILMAN_HOME
  user = MAILMAN_USER
  group = MAILMAN_GROUP
address_pipe:
  driver = pipe
  return_output
  user = ${lookup mysql{select users.uid from users,domains where localpart = '${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and users.domain_id = d
  group = ${lookup mysql{select users.gid from users,domains where localpart = '${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and users.domain_id =
address_pipe_catchall:
  driver = pipe
  return_output
  user = ${lookup mysql{select users.uid from users,domains where localpart = '*' and domain = '${quote_mysql:$domain}' and users.domain_id = domains.domain_id}}
  user = ${lookup mysql{select users.uid from users,domains where localpart = '${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and users.domain_id = d
  group = ${lookup mysql{select users.gid from users,domains where localpart = '${quote_mysql:$local_part}' and domain = '${quote_mysql:$domain}' and users.domain_id =
address_pipe_catchall:
  driver = pipe
  return_output
  user = ${lookup mysql{select users.uid from users,domains where localpart = '*' and domain = '${quote_mysql:$domain}' and users.domain_id = domains.domain_id}}
  group = ${lookup mysql{select users.gid from users,domains where localpart = '*' and domain = '${quote_mysql:$domain}' and users.domain_id = domains.domain_id}}
address_pipe_local:
  driver = pipe
  return_output
address_file:
  driver = appendfile
  delivery_date_add
  envelope_to_add
  return_path_add
address_reply:
  driver = autoreply
begin retry
*                      *           F,2h,15m; G,16h,1h,1.5; F,14d,6h
begin rewrite
begin authenticators
plain_login:
        driver = plaintext
        public_name = PLAIN
        server_condition = ${lookup mysql{SELECT '1' FROM users \
                                WHERE username = '${quote_mysql:$2}' \
                                AND clear = '${quote_mysql:$3}'} {yes}{no}}
        server_set_id = $2
fixed_login:
        driver = plaintext
        public_name = LOGIN
        server_prompts = "Username:: : Password::"
        server_condition = ${lookup mysql{SELECT '1' FROM users \
                                WHERE username = '${quote_mysql:$1}' \
                                AND clear = '${quote_mysql:$2}'} {yes}{no}}
        server_set_id = $1
fixed_cram:
        driver = cram_md5
        public_name = CRAM-MD5
        server_secret = ${lookup mysql{SELECT clear FROM users \
                                WHERE username = '${quote_mysql:$1}'}{$value}fail}
        server_set_id = $1

почта нужно что бы работала и по лакалке и с миром
если все заработает отблагодарю финансово

Хостинговая компания 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/

DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

Re: exim

Непрочитанное сообщение DN » 2013-12-23 9:49:04

создается ощущение либо ни кто не знает, либо на форуме ни кого не бывает

mak_v_
проходил мимо

Re: exim

Непрочитанное сообщение mak_v_ » 2013-12-23 11:26:48

Либо не ясно описано ТЗ.
Что есть, что работает?
Что надо, что не работает?

DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

Re: exim

Непрочитанное сообщение DN » 2013-12-23 13:03:34

mak_v_ писал(а):Либо не ясно описано ТЗ.
Что есть, что работает?
Что надо, что не работает?
спс за пояснение
есть - exim и spamassassin
работает - exim, spamassassin походу нет раз пропускает столько спама,
нужно - что бы было меньше спама, и что бы спамеры не слали от моих доменов спам другим, и мне в том числе

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

Return-path: <www-data@pipe.rtt4.net>
Envelope-to: info@МОЙ_ДОМЕН.ru
Received: from pipen.rtt4.net ([46.4.126.132]:54398 helo=pipe.rtt4.net)
	by mail.slavklin.ru with esmtp (Exim 4.80.1 (FreeBSD))
	(envelope-from <www-data@pipe.rtt4.net>)
	id 1Vu0hv-0000VR-Eg
	for info@МОЙ_ДОМЕН.ru; Fri, 20 Dec 2013 18:05:42 +0400
Received: by pipe.rtt4.net (Postfix, from userid 33)
	id DEF6028FA00A; Fri, 20 Dec 2013 13:20:52 +0100 (CET)
To: info@МОЙ_ДОМЕН.ru,sidorov.ivan@gmail.com,support.ru@adguard.com,reklammarka@ya.ru,km2ka@yandex.ru,kni97@mail.ru,mouddytuzl@rambler.ru,cdik2006@rambler.ru
X-PHP-Originating-Script: 33:error.php
From:info@МОЙ_ДОМЕН.ru
X-Mailer: The Bat!  (v3.0)
Content-type: text/html; charset=windows-1251
Message-Id: <20131220122052.DEF6028FA00A@pipe.rtt4.net>
Date: Fri, 20 Dec 2013 13:20:52 +0100 (CET)
Received-SPF: 
X-SA-Exim-Connect-IP: 46.4.126.132
X-SA-Exim-Mail-From: www-data@pipe.rtt4.net
Subject: Хотя бы прочитайте
X-SA-Exim-Version: 4.2
X-SA-Exim-Scanned: No (on mail.МОЙ_ДОМЕН.ru); Unknown failure

<HTML><BODY><p id="85fsc4e7y7072Wz8" class="2KK3JaHXjv3">Доброго времени суток! Я финансист, Хочу показать Вам автономный сервис, который приносит доход!  Тут детальное описание, прочитайте подробно. http://gieffeci.it/acidemia/orator/?5ICO6HJH  Успехов вам! </p> </BODY></HTML>
почтавики The Bat и thunderbird

mak_v_
проходил мимо

Re: exim

Непрочитанное сообщение mak_v_ » 2013-12-23 13:19:18

1) первым делом - авторизация для смтп
2) порезка спама средствами exim - всякие проверки получателей, хело, PTR и т.д. (из этого в у вас практически ноль)
3) продуманная политика фильтрации - раз спамассасин, то посмотрите и подумайте где и как он работает и должен по вашей задумке работать(исходя из лога - не работает вообще)

DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

Re: exim

Непрочитанное сообщение DN » 2013-12-23 15:29:51

mak_v_ писал(а):1) первым делом - авторизация для смтп
2) порезка спама средствами exim - всякие проверки получателей, хело, PTR и т.д. (из этого в у вас практически ноль)
3) продуманная политика фильтрации - раз спамассасин, то посмотрите и подумайте где и как он работает и должен по вашей задумке работать(исходя из лога - не работает вообще)
да вот же я и пытаюсь для начала выяснить как сделать авторизацию по смтп, а уж потом попытаться донастроить spamassasin

с exim имею дело в первый раз

DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

Re: exim

Непрочитанное сообщение DN » 2013-12-23 16:42:42

поправьте пожалуйста если не правильно
сделал так
/usr/local/etc/exim/vexim-acl-check-helo.conf

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

# Lets drop all messages where the HELO argument is our IP address
..
  accept hosts = :
  accept hosts = +relay_from_hosts
  drop condition = ${if match{$sender_helo_name}{MY_IP}{yes}{no} }
       message   = "Dropped spammer pretending to be us"
  drop condition = ${if match{$sender_helo_name}{^[0-9]\.[0-9]\.[0-9]\.[0-9]}{yes}{no} }
       message   = "Dropped IP-only or IP-starting helo"
  accept
vexim-acl-check-helo:
# Hosts are required to say HELO (or EHLO) before sending mail.
# So don't allow them to use the MAIL command if they haven't
# done so.

deny condition = ${if eq{$sender_helo_name}{} {1}}
       message = Nice boys say HELO first
       .include        /usr/local/etc/exim/vexim-acl-check-helo.conf
.......
       # Use the lack of reverse DNS to trigger greylisting. Some people
       # even reject for it but that would be a little excessive.
.......
       warn condition = ${if eq{$sender_host_name}{} {1}}
            set acl_m_greylistreasons = Host $sender_host_address lacks reverse
            DNS\n$acl_m_greylistreasons
............
            accept
deny  condition    =    ${if match{$sender_helo_name}{\N\d{1,3}[-.]\d{1,3}[-.]\d{1,3}\N}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "DNS name is very bad"..
                           logwrite    =    "DNSname($sender_helo_name) bad"
deny  condition    =    ${if eq{$sender_helo_name}{$sender_host_address}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) eq Address($sender_host_address)"
deny  condition    =    ${if eq{$sender_helo_name}{$interface_address}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) eq Inerface Address($interface_address)"
deny  condition    =    ${if eq{$sender_helo_name}{\N\d{1,3}\.d{1,3}\.d{1,3}\.d{1,3}\N}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) is IP"
deny  condition    =    ${if eq{$sender_helo_name}{\N\d{1,3}[-.]\d{1,3}[-.]\d{1,3}\N}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) is bad"
deny  condition    =    ${if match{$sender_helo_name}{\N^\d+$\N}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local-network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) contains only number"
deny  condition    =    ${if match{$sender_helo_name}{\N^\w+$\N}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) contains only literals"
deny  condition    =    ${if match{$sender_helo_name}{\N^\s+$\N}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) contains only spaces"
deny  condition    =    ${if match{$sender_helo_name}{сюда добавить свое имя хоста}{yes}{no}}..
         hosts  =    !+relay_from_hosts : !+local_network..
                  message =    "HELO is bad"..
                           logwrite    =    "HELO($sender_helo_name) is my HELO"
и там где sender_helo_name нужно прописать свой домен например: mail.my_domain.ru ?
и даст ли это вообще что нибудь?

Аватара пользователя
skeletor
майор
Сообщения: 2508
Зарегистрирован: 2007-11-16 18:22:04
Откуда: Kiev
Контактная информация:

Re: exim

Непрочитанное сообщение skeletor » 2013-12-23 18:10:43

Спамассассин мало поставить и настроить - его нужно обучать и качать периодически обновления (блэклисты, базы спамеров, ...)
"Винда съела дрова и резет здесь не фурычит."
"Все говорят, что у меня /dev/hands криво и я всё делаю через /dev/ass. А у меня этих фалов вообще нет!"

DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

Re: exim

Непрочитанное сообщение DN » 2013-12-24 10:26:22

skeletor писал(а):Спамассассин мало поставить и настроить - его нужно обучать и качать периодически обновления (блэклисты, базы спамеров, ...)
так это я и хочу (научите меня) или лучше тыкните носом где есть рабочая инструкция как настроить спамассасин

DN
рядовой
Сообщения: 29
Зарегистрирован: 2013-07-26 13:07:09

Re: exim

Непрочитанное сообщение DN » 2013-12-24 10:53:31

сделал так пока вроде работает спама от самого себе не замечаю

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

 # Lets drop all messages where the HELO argument is our IP address
 
  accept hosts = :
  accept hosts = +relay_from_hosts
deny condition = ${if eq{$sender_helo_name}{} {1}}
       message = Nice boys say HELO first
deny  condition    =    ${if match{$sender_helo_name}{\N\d{1,3}[-.]\d{1,3}[-.]\d{1,3}\N}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "DNS name is very bad"
                                                      logwrite    =    "DNSname($sender_helo_name) bad"
deny  condition    =    ${if eq{$sender_helo_name}{$sender_host_address}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) eq Address($sender_host_addre
deny  condition    =    ${if eq{$sender_helo_name}{$interface_address}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) eq Inerface Address($interfac
deny  condition    =    ${if eq{$sender_helo_name}{\N\d{1,3}\.d{1,3}\.d{1,3}\.d{1,3}\N}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) is IP"
deny  condition    =    ${if eq{$sender_helo_name}{\N\d{1,3}[-.]\d{1,3}[-.]\d{1,3}\N}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) is bad"
deny  condition    =    ${if match{$sender_helo_name}{\N^\d+$\N}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local-network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) contains only number"
deny  condition    =    ${if match{$sender_helo_name}{\N^\w+$\N}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) contains only literals"
deny  condition    =    ${if match{$sender_helo_name}{\N^\s+$\N}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network : !+friendly_hosts
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) contains only spaces"
deny  condition    =    ${if match{$sender_helo_name}{mail.мой доме.ru}{yes}{no}}
         hosts  =    !+relay_from_hosts : !+local_network
                           message =    "HELO is bad"
                                                      logwrite    =    "HELO($sender_helo_name) is my HELO"
  accept
 
осталось настроить spamassasin с поддержкой блек листов