Проблема в следующем, письмо после поподания на сервер проходит через несколько релеевПодсоединяется все вот по такому принципу:
---------------------------------------------------------------------
genocide unix - n n - 1 pipe
flags=R
user=filter
argv=/.../antivir.pl "localhost:10026" "${sender}" "${recipient}"###----FROM ANTIVIRUS----###
localhost:10026 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o mynetworks=127.0.0.0/8
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o myhostname=localhost
---------------------------------------------------------------------
вот пример лога по которому прошло одно письмо:
---------------------------------------------------------------------
Apr 20 22:16:25 ciurlioniomm postfix/smtpd[80900]: connect from mail.cablenet.lt[217.147.34.8]
Apr 20 22:16:26 ciurlioniomm postfix/smtpd[80900]: B7FC62309: client=mail.cablenet.lt[217.147.34.8]
Apr 20 22:16:26 ciurlioniomm postfix/smtpd[80900]: disconnect from mail.cablenet.lt[217.147.34.8]
Apr 20 22:16:27 ciurlioniomm postfix/smtpd[80900]: connect from mail.cablenet.lt[217.147.34.8]
Apr 20 22:16:27 ciurlioniomm postfix/smtpd[80900]: 6AB842309: client=mail.cablenet.lt[217.147.34.8]
Apr 20 22:16:27 ciurlioniomm postfix/cleanup[80902]: 6AB842309: message-id=<3454.192.168.0.2.1114023637.squirrel@dns-pro.org>
Apr 20 22:16:27 ciurlioniomm postfix/smtpd[80900]: disconnect from mail.cablenet.lt[217.147.34.8]
Apr 20 22:16:27 ciurlioniomm postfix/qmgr[27561]: 6AB842309: from=<xxxxx@dnspro.org>, size=2032, nrcpt=1 (queue active)
Apr 20 22:16:28 ciurlioniomm postfix/smtpd[80905]: connect from localhost[127.0.0.1]
Apr 20 22:16:28 ciurlioniomm postfix/smtpd[80905]: B9E3F2481: client=localhost[127.0.0.1]
Apr 20 22:16:28 ciurlioniomm postfix/cleanup[80902]: B9E3F2481: message-id=<3454.192.168.0.2.1114023637.squirrel@dnspro.org>
Apr 20 22:16:28 ciurlioniomm postfix/qmgr[27561]: B9E3F2481: from=<xxxxx@dnspro.org>, size=2199, nrcpt=1 (queue active)
Apr 20 22:16:29 ciurlioniomm postfix/smtpd[80905]: disconnect from localhost[127.0.0.1]
Apr 20 22:16:29 ciurlioniomm postfix/pipe[80903]: 6AB842309: to=<xxxxx@cmmvilniuslm.lt>, relay=forwarder, delay=2, status=sent (rel-1.ciurlioniomm.lt)
Apr 20 22:16:29 ciurlioniomm postfix/qmgr[27561]: 6AB842309: removed
Apr 20 22:16:40 ciurlioniomm postfix/smtpd[80911]: connect from localhost[127.0.0.1]
Apr 20 22:16:40 ciurlioniomm postfix/smtpd[80911]: 593092482: client=localhost[127.0.0.1]
Apr 20 22:16:40 ciurlioniomm postfix/cleanup[80902]: 593092482: message-id=<3454.192.168.0.2.1114023637.squirrel@dnspro.org>
Apr 20 22:16:40 ciurlioniomm postfix/qmgr[27561]: 593092482: from=<xxxxx@dnspro.org>, size=2367, nrcpt=1 (queue active)
Apr 20 22:16:40 ciurlioniomm postfix/smtpd[80911]: disconnect from localhost[127.0.0.1]
Apr 20 22:16:40 ciurlioniomm postfix/pipe[80906]: B9E3F2481: to=<xxxxx@cmmvilniuslm.lt>, relay=genocide, delay=12, status=sent (rel-1.ciurlioniomm.lt)
Apr 20 22:16:40 ciurlioniomm postfix/qmgr[27561]: B9E3F2481: removed
Apr 20 22:16:41 ciurlioniomm postfix/smtpd[80915]: connect from localhost[127.0.0.1]
Apr 20 22:16:41 ciurlioniomm spamd[72141]: connection from localhost [127.0.0.1] at port 60493
Apr 20 22:16:41 ciurlioniomm spamd[72141]: processing message <3454.192.168.0.2.1114023637.squirrel@dnspro.org> for filter:1003.
Apr 20 22:16:42 ciurlioniomm postfix/smtpd[80915]: 4ACCE2483: client=localhost[127.0.0.1]
Apr 20 22:16:42 ciurlioniomm spamd[72141]: clean message (-0.8/4.8) for filter:1003 in 1.0 seconds, 2348 bytes.
Apr 20 22:16:42 ciurlioniomm spamd[72141]: result: . 0 - AWL,BAYES_50,NO_REAL_NAME scantime=1.0,size=2348,mid=<3454.192.168.0.2.1114023637.squirrel@dnspro.org>,bayes=0.499996667921452,autolearn=disabled
Apr 20 22:16:42 ciurlioniomm postfix/cleanup[80902]: 4ACCE2483: message-id=<3454.192.168.0.2.1114023637.squirrel@dnspro.org>
Apr 20 22:16:43 ciurlioniomm postfix/qmgr[27561]: 4ACCE2483: from=<xxxxx@dnspro.org>, size=2542, nrcpt=1 (queue active)
Apr 20 22:16:43 ciurlioniomm postfix/smtpd[80915]: disconnect from localhost[127.0.0.1]
Apr 20 22:16:43 ciurlioniomm postfix/pipe[80912]: 593092482: to=<xxxxx@cmmvilniuslm.lt>, relay=spamfilter, delay=3, status=sent (rel-1.ciurlioniomm.lt)
Apr 20 22:16:43 ciurlioniomm postfix/qmgr[27561]: 593092482: removed
Apr 20 22:16:43 ciurlioniomm postfix/virtual[80916]: 4ACCE2483: to=<xxxxx@cmmvilniuslm.lt>, relay=virtual, delay=1, status=sent (delivered to maildir)
Apr 20 22:16:43 ciurlioniomm postfix/qmgr[27561]: 4ACCE2483: removed
---------------------------------------------------------------------Любая програмулька для сбора статистики тут распазнает 4 письма, это правильно, но с точки зрения статистики неправильно, только один awstats удалось настроить на более менее внятные результаты, и то не по всем статистикам. Так вот собственно говоря вопрос на засыпку, как проще всего отсюда убрать все ненужное, все остальное направить в другой лог, у меня соображения есть, хотел бы послушать какие будут предложения...
Я думал еще просто пройтись по логу фильтром и убрать оттуда все ненужное... но меня такой вареант не вдохнавляет.
Хотел бы чтобы нормально заработал постфиксовый pflogsumm.pl, конечто можно при выводи статистики результаты делить на 4, но это совсем садизм
>Я думал еще просто пройтись по логу фильтром и убрать оттуда все
>ненужное... но меня такой вареант не вдохнавляет.
В master.cf через -o syslog_facility можете разделить логи оставив в maillog только нужное. Для долгоживущих процессов это работать не будет.
>В master.cf через -o syslog_facility можете разделить логи оставив в maillog только
А как правильно это написать, если пишу чтото типо
-o syslog_facility=/var/log/maillog.antivir
то все перестает работать
а если
-o syslog_facility=all /var/log/maillog.antivir
или
-o syslog_facility=* /var/log/maillog.antivirparameter syslog_facility: unrecognized value: *.*
parameter syslog_facility: unrecognized value: all
parameter syslog_facility: unrecognized value: /var/log/maillog.antivir
>>В master.cf через -o syslog_facility можете разделить логи оставив в maillog только
>А как правильно это написать, если пишу чтото типо
-o syslog_facility=daemon
man 3 syslog про facility (в конфиге указывать без префикса "LOG_")
>-o syslog_facility=daemonВсеравно не то, он убрал половину строк, но все соединения от фильтов так и остались :( Плюс эти фильтры работать перестали
>Всеравно не то, он убрал половину строк, но все соединения от фильтов
>так и остались :( Плюс эти фильтры работать перестали
Кто он???
А работать фильтры перестали - так это ваши руки виноваты...
>Кто он???
>А работать фильтры перестали - так это ваши руки виноваты...Ну вот
-------------------------------------------------------------------
Apr 25 12:16:18 ciurlioniom postfix/qmgr[8876]: AE4C7214A: from=<qqq@dnspro.org>, size=744, nrcpt=1 (queue active)
Apr 25 12:16:20 ciurlioniom postfix/qmgr[8876]: 1E2A32286: from=<qqq@dnspro.org>, size=914, nrcpt=1 (queue active)
Apr 25 12:16:20 ciurlioniom postfix/pipe[8987]: AE4C7214A: to=<xxx@ciurlioniom.lt>, relay=forwarder, delay=2, status=sent (rel-1.ciurlioniom.lt)
Apr 25 12:16:31 ciurlioniom postfix/qmgr[8876]: DEF1D230A: from=<qqq@dnspro.org>, size=1085, nrcpt=1 (queue active)
Apr 25 12:16:31 ciurlioniom postfix/pipe[8990]: 1E2A32286: to=<xxx@ciurlioniom.lt>, relay=genocide, delay=11, status=sent (rel-1.ciurlioniom.lt)
Apr 25 12:16:36 ciurlioniom postfix/qmgr[8876]: 1BCCA230C: from=<qqq@dnspro.org>, size=1256, nrcpt=1 (queue active)
Apr 25 12:16:36 ciurlioniom postfix/pipe[8996]: DEF1D230A: to=<xxx@ciurlioniom.lt>, relay=spamfilter, delay=6, status=sent (rel-1.ciurlioniom.lt)
Apr 25 12:16:36 ciurlioniom postfix/virtual[9002]: 1BCCA230C: to=<xxx@ciurlioniom.lt>, relay=virtual, delay=3, status=sent (delivered to maildir)
-------------------------------------------------------------------
те строчки ктоторые портят статистику как были так и остались...
>те строчки ктоторые портят статистику как были так и остались...
Читайте man syslog (и все ссылки из "SEE ALSO") до полного понимания
>>те строчки ктоторые портят статистику как были так и остались...
>Читайте man syslog (и все ссылки из "SEE ALSO") до полного понимания
>
и на том спасибо, буду копать в этом направлении