* [Sysadmins] Вопрос по amavis+spamassassin+clamav
@ 2008-11-20 14:49 Roman Lesnichenko
2008-11-21 6:07 ` Sergey
0 siblings, 1 reply; 7+ messages in thread
From: Roman Lesnichenko @ 2008-11-20 14:49 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
Добрый день!
Настроил я все-таки postfix+mysql+dovecot+amavis+spamassassin+clamav+sqlgrey
:)
Как бы все работает, но меня терзают смутные сомнения.
Когда у меня Спамассассин раньше работал вот так
smtp inet n - - - - smtpd
-o content_filter=filter:spamcheck
Все было нормально и понятно. В каждом письме были соответствующие строки
типа:
X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on xxx.xxx.xxx.xxx
X-Spam-Level: **
X-Spam-Status: No, score=2.7 required=6.0 tests=MIME_BASE64_TEXT autolearn=no
version=3.2.4
Теперь его пускает amavis, что скрыто от меня завесой тайны, хоть я и включал
логгирование и дебаги :)
Теперь же в тех письмах, которые проходят :) такие header-fields далеко не во
всех. И выглядят по другому:
X-Spam-Flag: NO
X-Spam-Score: 2.235
X-Spam-Level: **
X-Spam-Status: No, score=2.235 tagged_above=2 required=6.31
tests=[DEAR_SOMETHING=2.234, HTML_MESSAGE=0.001]
Это касается, только заголовков от спама.
Заголовки X-Virus-Scanned: by amavisd-new using ClamAV at xxx.xxx.xxx
Присутствуют всегда. Даже пара вирусов выловилась.
Вобщем, что я делаю не так. :)
Конфигу спам-ассасина не менял естессно.
И еще вопрос. Как согласно линии партии всю эту ерунду политически правильно
запускать?
На данный момент как-то все из разных мест:
postfix/main.cf:
#Amavis
content_filter=smtp-amavis:[127.0.0.1]:10024
# Open relay disable
smtpd_recipient_restrictions =
permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_rbl_client
list.dsbl.org,reject_rbl_client dynablock.wirehub.net,reject_rbl_client
dnsbl.njabl.org,reject_rbl_client sbl-xbl.spamhaus.org,check_policy_service
inet:127.0.0.1:2501
postfix/master.cf:
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
# -o smtpd_delay_reject=no
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
# -o smtpd_data_restrictions=reject_unauth_pipeling
# -o smtpd_end_of_data_restrictions=
-o myntworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
# -o smtpd_client_connection_count_limit=0
# -o smtpd_client_connection_rate_limit=0
# -o
receive_override_options=no_header_body_checks,no_unknown_recipient_checks
# -o local_header_rewrite_clients=
smtp inet n - - - - smtpd
Роман.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] Вопрос по amavis+spamassassin+clamav
2008-11-20 14:49 [Sysadmins] Вопрос по amavis+spamassassin+clamav Roman Lesnichenko
@ 2008-11-21 6:07 ` Sergey
2008-11-21 9:57 ` Konstantin A. Lepikhov
0 siblings, 1 reply; 7+ messages in thread
From: Sergey @ 2008-11-21 6:07 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
On Thursday 20 November 2008, Roman Lesnichenko wrote:
> Это касается, только заголовков от спама.
> Заголовки X-Virus-Scanned: by amavisd-new using ClamAV at xxx.xxx.xxx
> Присутствуют всегда. Даже пара вирусов выловилась.
>
> Вобщем, что я делаю не так. :)
Одно дело, когда сообщение обрабатывает spamassassin и ставит в
заголовок то, что умеет он, другое - когда обрабатывает amavisd
и ставит то, что умеет он. amavisd использует spamassassin-spamd ?
Или я ошибвюсь ?
--
С уважением, Сергей
a_s_y@sama.ru
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] Вопрос по amavis+spamassassin+clamav
2008-11-21 6:07 ` Sergey
@ 2008-11-21 9:57 ` Konstantin A. Lepikhov
2008-11-21 10:15 ` Roman Lesnichenko
0 siblings, 1 reply; 7+ messages in thread
From: Konstantin A. Lepikhov @ 2008-11-21 9:57 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
Hi Sergey!
Friday 21, at 10:07:50 AM you wrote:
> On Thursday 20 November 2008, Roman Lesnichenko wrote:
>
> > Это касается, только заголовков от спама.
> > Заголовки X-Virus-Scanned: by amavisd-new using ClamAV at xxx.xxx.xxx
> > Присутствуют всегда. Даже пара вирусов выловилась.
> >
> > Вобщем, что я делаю не так. :)
>
> Одно дело, когда сообщение обрабатывает spamassassin и ставит в
> заголовок то, что умеет он, другое - когда обрабатывает amavisd
> и ставит то, что умеет он. amavisd использует spamassassin-spamd ?
> Или я ошибвюсь ?
раньше amavisd вызывал spamassassin через перловый модуль.
--
WBR et al.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] Вопрос по amavis+spamassassin+clamav
2008-11-21 9:57 ` Konstantin A. Lepikhov
@ 2008-11-21 10:15 ` Roman Lesnichenko
2008-11-22 2:24 ` Alexey Shabalin
0 siblings, 1 reply; 7+ messages in thread
From: Roman Lesnichenko @ 2008-11-21 10:15 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
On Friday 21 November 2008 11:57:53 Konstantin A. Lepikhov wrote:
> > Одно дело, когда сообщение обрабатывает spamassassin и ставит в
> > заголовок то, что умеет он, другое - когда обрабатывает amavisd
> > и ставит то, что умеет он. amavisd использует spamassassin-spamd ?
> > Или я ошибвюсь ?
>
> раньше amavisd вызывал spamassassin через перловый модуль.
Вроде так оно и есть.
Но вот вопрос тогда следующий:
амавис решает когда вызывать спамассассин?
если да - то мне это не нравится :)
Как тогда сделать по старому? Чтобы спамассассин работал всегда?
Выключить его в настройках амависа и куда-нибудь воткнуть вот это:
-o content_filter=filter:spamcheck
Вопрос: куда?
После этого:
smtp-amavis unix - - n - 2 smtp
Или после этого:
127.0.0.1:10025 inet n - n - - smtpd
Или уже в конце, как и было раньше после этого:
smtp inet n - - - - smtpd
Роман.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] Вопрос по amavis+spamassassin+clamav
2008-11-21 10:15 ` Roman Lesnichenko
@ 2008-11-22 2:24 ` Alexey Shabalin
2008-11-22 6:35 ` Sergey
2008-11-23 21:33 ` Roman Lesnichenko
0 siblings, 2 replies; 7+ messages in thread
From: Alexey Shabalin @ 2008-11-22 2:24 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
21 ноября 2008 г. 13:15 пользователь Roman Lesnichenko написал:
> On Friday 21 November 2008 11:57:53 Konstantin A. Lepikhov wrote:
>
>> > Одно дело, когда сообщение обрабатывает spamassassin и ставит в
>> > заголовок то, что умеет он, другое - когда обрабатывает amavisd
>> > и ставит то, что умеет он. amavisd использует spamassassin-spamd ?
>> > Или я ошибвюсь ?
>>
пожалуйста читайте документацию. и faq. вот выдержка из faq:
(http://www.ijs.si/software/amavisd/#faq)
No spam-related headers inserted? Here are some reasons:
- @local_domains_acl is not correctly set. These headers are only
inserted for recipients matching @local_domains_acl lookup (or
%local_domains or $local_domains_re or field 'local' in SQL lookups);
- headers can only be added or edited when messages pass through
amavisd-new. This currently is not the case with sendmail milter setup
(using the helper program amavis-milter.c);
- tag level is set too high ($sa_tag_level_defl);
- when SpamAssassin is not being called (disabled, message larger than
the $sa_mail_body_size_limit, sender white/blacklisted), or SA returns
an empty score e.g. when it times out, the spam score is empty
(undefined);
- to make message with spam score above kill_level still pass, either
set globally: $final_spam_destiny=D_PASS, or declare recipient a
spam_lover.
>> раньше amavisd вызывал spamassassin через перловый модуль.
> Вроде так оно и есть.
да, так и есть
> Но вот вопрос тогда следующий:
> амавис решает когда вызывать спамассассин?
> если да - то мне это не нравится :)
amavisd-new пропускает ВСЕ письма через все антивирусы(которые есть в
системе и настроены)
и через spamassassin. Не проверяются "любители спама" (spam_lover) и
белые списки (но можно сделать проверяемый список, только балл им
заниженый будет выставлять).
> Как тогда сделать по старому? Чтобы спамассассин работал всегда?
> Выключить его в настройках амависа и куда-нибудь воткнуть вот это:
> -o content_filter=filter:spamcheck
>
content_filter не обязательно должен быть в main.cf (лучше его убрать)
- а все настройки делать в master.cf.
опять же читаем документацию
http://www.ijs.si/software/amavisd/amavisd-new-docs.html
http://www.ijs.si/software/amavisd/README.postfix.html
Кроме content_filter, можно использовать smtpd_proxy_filter (это уже
документацию на postfix читайте
http://www.postfix.org/SMTPD_PROXY_README.html)
> Вопрос: куда?
Всё зависит от того, что вам надо фильтровать:
Filtering e-mail globally
Filtering e-mail globally by service
Filtering e-mail per recipient domain
Filtering e-mail per sender domain
Filtering e-mail by content
>
> После этого:
> smtp-amavis unix - - n - 2 smtp
>
> Или после этого:
> 127.0.0.1:10025 inet n - n - - smtpd
>
> Или уже в конце, как и было раньше после этого:
> smtp inet n - - - - smtpd
PS: между прочим вся документация есть в репозитории.
Люди читайте документацию. У amavisd-new количество настроек чуть
меньше postfix, но дефолтные могут быть не очень хорошо для Вас.
--
Alexey Shabalin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] Вопрос по amavis+spamassassin+clamav
2008-11-22 2:24 ` Alexey Shabalin
@ 2008-11-22 6:35 ` Sergey
2008-11-23 21:33 ` Roman Lesnichenko
1 sibling, 0 replies; 7+ messages in thread
From: Sergey @ 2008-11-22 6:35 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
On Saturday 22 November 2008, Alexey Shabalin wrote:
> >> > и ставит то, что умеет он. amavisd использует spamassassin-spamd ?
> >> > Или я ошибвюсь ?
> >>
> пожалуйста читайте документацию. и faq. вот выдержка из faq:
> (http://www.ijs.si/software/amavisd/#faq)
Это немного не ко мне. Мне amavisd не интересен в настоящий момент. :-)
Я просто предположил, что он использует spamassassin-spamd. В этом случае
понятно, почему могут различаться добавляемые заголовки в первом м втором
случаях.
--
С уважением, Сергей
a_s_y@sama.ru
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Sysadmins] Вопрос по amavis+spamassassin+clamav
2008-11-22 2:24 ` Alexey Shabalin
2008-11-22 6:35 ` Sergey
@ 2008-11-23 21:33 ` Roman Lesnichenko
1 sibling, 0 replies; 7+ messages in thread
From: Roman Lesnichenko @ 2008-11-23 21:33 UTC (permalink / raw)
To: ALT Linux sysadmin discuss
On Saturday 22 November 2008 04:24:45 Alexey Shabalin wrote:
> пожалуйста читайте документацию. и faq. вот выдержка из faq:
> (http://www.ijs.si/software/amavisd/#faq)
>
> No spam-related headers inserted? Here are some reasons:
> - @local_domains_acl is not correctly set. These headers are only
> inserted for recipients matching @local_domains_acl lookup (or
> %local_domains or $local_domains_re or field 'local' in SQL lookups);
> - headers can only be added or edited when messages pass through
> amavisd-new. This currently is not the case with sendmail milter setup
> (using the helper program amavis-milter.c);
> - tag level is set too high ($sa_tag_level_defl);
> - when SpamAssassin is not being called (disabled, message larger than
> the $sa_mail_body_size_limit, sender white/blacklisted), or SA returns
> an empty score e.g. when it times out, the spam score is empty
> (undefined);
> - to make message with spam score above kill_level still pass, either
> set globally: $final_spam_destiny=D_PASS, or declare recipient a
> spam_lover.
>
>
> PS: между прочим вся документация есть в репозитории.
> Люди читайте документацию. У amavisd-new количество настроек чуть
> меньше postfix, но дефолтные могут быть не очень хорошо для Вас.
:)
Спасибо.
Недаром сказано: RTFM :)
Но очень много значит, когда знающий человек ткнет носом в нужный абзац :)
--
Roman.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-23 21:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-20 14:49 [Sysadmins] Вопрос по amavis+spamassassin+clamav Roman Lesnichenko
2008-11-21 6:07 ` Sergey
2008-11-21 9:57 ` Konstantin A. Lepikhov
2008-11-21 10:15 ` Roman Lesnichenko
2008-11-22 2:24 ` Alexey Shabalin
2008-11-22 6:35 ` Sergey
2008-11-23 21:33 ` Roman Lesnichenko
ALT Linux sysadmins discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sysadmins/0 sysadmins/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sysadmins sysadmins/ http://lore.altlinux.org/sysadmins \
sysadmins@lists.altlinux.org sysadmins@lists.altlinux.ru sysadmins@lists.altlinux.com
public-inbox-index sysadmins
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sysadmins
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git