Exim + Dbmail + Dspam + Clamav

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

Модератор: xM

Правила форума
Убедительная просьба юзать теги [code] при оформлении листингов.
Сообщения не оформленные должным образом имеют все шансы быть незамеченными.
root
проходил мимо
Сообщения: 9
Зарегистрирован: 2006-04-18 23:47:35

Exim + Dbmail + Dspam + Clamav

Непрочитанное сообщение root » 2006-11-24 14:32:03

Решил сделать вот такую вот связочку.
Вернее сейчас всё работает в связке Exim + Dbmail + Clamav, хочу ещё Dspam добавить, но не знаю как. Clamav интегрируется в Dspam, соответственно остается в связку Exim + Dbmail интегрировать Dspam.
Вобщем есть такой конфиг:

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

begin routers

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

dbmailuser:
  driver = accept
  condition = ${lookup mysql{SELECT `alias_idnr` FROM \
  `dbmail_aliases` WHERE \
  `alias`='${quote_mysql:$local_part@$domain}' OR \
  `alias`='${quote_mysql:@$domain}'}{yes}{no}}
  transport = dbmail_delivery

begin transports

remote_smtp:
  driver = smtp

dbmail_delivery:
  driver = pipe
  check_string =
  command = /usr/local/sbin/dbmail-smtp -d ${pipe_addresses}
  group = mail
  message_prefix = ""
  message_suffix = ""
  path="/bin:/sbin:/usr/local/bin:/usr/local/sbin"

address_pipe:
  driver = pipe
  return_output

address_reply:
  driver = autoreply
И есть конфиг для dspam'a:
Тут я полагаю проверяется локальный юзер, а не из мускульной базы дбмейла.
Routers

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

dspam_router:
   no_verify
   check_local_user
   # When to scan a message :
   # - it isn't already flagged as spam from Spamassassin
   # - it isn't already flagged as spam from DSPAM
   # - it isn't already scanned
   # - it isn't local
   # - it isn't from one internal domain user to another
   # - it is less than 512k in size
   condition   = "${if and { \
                           {!def:h_X-Spam-Flag:} \
                           {!def:h_X-FILTER-DSPAM:} \
                           {!eq {$received_protocol}{local}} \
                           { <= {$message_size}{512k}} \
                           }\
                           {1}{0}}"
   headers_add  = "X-FILTER-DSPAM: by $primary_hostname on $tod_full"
   driver       = accept
   transport    = dspam_spamcheck
   # Which users to run dspam for.
   #local_parts = /usr/local/etc/exim/dspam-testers
dspam_addspam_router:
 driver            = accept
 local_part_prefix = spam-
 transport         = dspam_addspam
dspam_falsepositive_router:
 driver            = accept
 local_part_prefix = nospam-
 transport         = dspam_falsepositive
Transports

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

dspam_spamcheck:
 driver = pipe
 command = "/usr/local/bin/dspam --deliver=innocent --user ${lc:$local_part} -f \
           '$sender_address' -- %u"
 home_directory = "/tmp"
 current_directory = "/tmp"
 user = exim
 group = mail
 log_output = true
 return_fail_output = true
 return_path_add = false
 message_prefix =
 message_suffix =

dspam_addspam:
 driver = pipe
 command = "/usr/local/bin/dspam --class=spam --source=error --user \
            ${lc:$local_part} -f '$sender_address' -- %u"
 home_directory = "/tmp"
 current_directory = "/tmp"
 user = exim
 group = mail
 log_output = true
 return_fail_output = true
 return_path_add = false
 message_prefix =
 message_suffix =

dspam_falsepositive:
 driver = pipe
 command = "/usr/local/bin/dspam --class=innocent --source=error \
           --deliver=innocent,spam --user ${lc:$local_part}\
           -f '$sender_address' -- %u"
 home_directory = "/tmp"
 current_directory = "/tmp"
 user = exim
 group = mail
 log_output = true
 return_fail_output = true
 return_path_add = false
 message_prefix =
 message_suffix =
Как бы их объеденить?
Т.е. сначала обрубаем спам dspam'ом и дальше передаем dbmail'у...

Хостинговая компания 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
стреляли...
Сообщения: 35428
Зарегистрирован: 2004-10-18 14:25:19
Откуда: Made in USSR
Контактная информация:

Непрочитанное сообщение Alex Keda » 2006-11-24 22:31:31

а в фильтре системноом его не привернуть?
Убей их всех! Бог потом рассортирует...

root
проходил мимо
Сообщения: 9
Зарегистрирован: 2006-04-18 23:47:35

Непрочитанное сообщение root » 2006-11-28 12:09:31

lissyara писал(а):а в фильтре системноом его не привернуть?
Неа =(