From: "Аркадий Павлик" <pvl@pskb.com> To: community@altlinux.ru Subject: [Comm] bogofilter's script for postfix Date: Mon, 25 Aug 2003 15:40:33 +1100 Message-ID: <200308251540.33879.pvl@pskb.com> (raw) Всем привет! Вместе с 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 ..." Как бы эту проблему победить? -- С наилучшими пожеланиями, Аркадий Павлик
next reply other threads:[~2003-08-25 4:40 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-08-25 4:40 Аркадий Павлик [this message] 2003-08-25 6:35 ` Аркадий Павлик
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=200308251540.33879.pvl@pskb.com \ --to=pvl@pskb.com \ --cc=community@altlinux.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
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