|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Craig Sanders (cas
taz.net.au)
Date: Sat Mar 01 2003 - 18:28:18 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Sat, Mar 01, 2003 at 06:53:59PM -0500, Wietse Venema wrote:
> > i have the following in master.cf
> >
> > smtp inet n - n - - smtpd -o content_filter=bogofilter:
> >
> > bogofilter unix - n n - - pipe
> > user=filter argv=/home/filter/bf.sh ${sender} ${recipient}
>
> In that case, the file size limit is that of the master's parent
> process (ultimately, inherited from /sbin/init). Master resets the
> file size limit only when it can't make sense of the the inherited
> value. In that case it sets the limit to the generous value of
> MAX_INT, which is 2GB on 32-bit systems.
great. that eliminates that worry.
> There's another limit you may want to be aware of. As of Postfix 2.0.4
> the command time limit is enforced like it used to be many, many,
> years ago. Mail that takes too much time is returned as undeliverable
> (but the bounce is not run through the content scanner).
yep. i'm still running 2.0.3 at the moment, will upgrade to 2.0.4 soon.
in the meantime, my bf.sh script uses procmail to enforce timeouts on
bogofilter and spamassassin (i rewrote the scripts a few days ago when i
noticed that some instances of spamd (v2.44) were stuck, with run-times
of over 30 minutes).
bf.sh looks like this:
---cut here---
#!/bin/bash
export PATH=$PATH:/usr/sbin
export HOME=/home/filter
cd $HOME
export SENDER="$1"
shift
export RECIPIENTS="$
"
#logger -p syslog.notice "$0: -f '$SENDER' '$RECIPIENTS'"
/usr/bin/procmail -t -p -m /home/filter/bf.prc || exit 75
---cut here---
and bf.prc looks like:
---cut here---
#VERBOSE=on
#LOGFILE=$HOME/bf.prc.log
:0 fW
| /usr/bin/bogofilter -l -u -e -p
:0 fW
| /usr/bin/spamc
:0
| /usr/sbin/sendmail -i -f "$SENDER" "$RECIPIENTS"
---cut here---
a very simple content-filter (and probably not 100% robust, although it
hasn't lost any mail yet). i was using amavisd but found that there was
enormous overhead, causing server load to skyrocket and delivery to
become unreliable (i have thousands of local spamassassin rules).
craig
--
craig sanders <cas
taz.net.au>
Fabricati Diem, PVNC.
-- motto of the Ankh-Morpork City Watch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]