* [Comm] bogofilter's script for postfix
@ 2003-08-25 4:40 Аркадий Павлик
2003-08-25 6:35 ` Аркадий Павлик
0 siblings, 1 reply; 2+ messages in thread
From: Аркадий Павлик @ 2003-08-25 4:40 UTC (permalink / raw)
To: community
Всем привет!
Вместе с bogofilter'ом в описании его интеграции с postfix есть скриптик, как
почту фильтровать:
#!/bin/sh
FILTER=/usr/bin/bogofilter
FILTER_DIR=/var/spool/filter
POSTFIX=/usr/sbin/postfix
export BOGOFILTER_DIR=/home/bogofilter
# Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69
cd $FILTER_DIR || \
{ echo $FILTER_DIR does not exist; exit $EX_TEMPFAIL; }
# Clean up when done or when aborting.
trap "rm -f inp.$$ msg.$$ ; exit $EX_TEMPFAIL" 0 1 2 3 15
# bogofilter returns: 0 for spam; 1 for non-spam;
# 2 for I/O or other errors.
rm -f inp.$$ || exit $EX_TEMPFAIL
cat > inp.$$ || exit $EX_TEMPFAIL
$FILTER -p -u -e < inp.$$ > msg.$$ || exit $EX_TEMPFAIL
exec $POSTFIX "$@" < msg.$$
exit $EX_TEMPFAIL
Так вот этот скрипт плодит файлы inp.* и msg* со страшной скоростью.
Конструкция "trap ..." не срабатывает, насколько я понимаю, из-за "exec ..."
Как бы эту проблему победить?
--
С наилучшими пожеланиями,
Аркадий Павлик
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-08-25 6:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-25 4:40 [Comm] bogofilter's script for postfix Аркадий Павлик
2003-08-25 6:35 ` Аркадий Павлик
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/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 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git