1 SECTION = "console/network"
3 RDEPENDS = "glibc-gconv glibc-gconv-iso8859-1"
4 DESCRIPTION = "Bogofilter is a mail filter that classifies mail as spam or ham (non-spam) \
5 by a statistical analysis of the message's header and content (body). \
6 The program is able to learn from the user's classifications and corrections."
11 SRC_URI = "http://download.sourceforge.net/bogofilter/bogofilter-${PV}.tar.bz2 \
12 file://${FILESDIR}/configure.ac.patch;patch=1 \
14 file://postfix-filter.sh \
15 file://bogohelper.sh \
20 EXTRA_OECONF = "--with-libdb-prefix=${libdir}"
22 do_install_append () {
23 mkdir -p ${D}${sysconfdir}/default/volatiles
24 install -m 644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/01_bogofilter
25 install -m 755 ${WORKDIR}/postfix-filter.sh ${D}${bindir}/postfix-filter.sh
26 install -m 755 ${WORKDIR}/bogohelper.sh ${D}${bindir}/bogohelper.sh
30 grep filter /etc/group || addgroup filter
31 grep spam /etc/passwd || adduser --disabled-password --home=/var/spool/filter --ingroup filter -g "Bogofilter" spam
32 grep bogo /etc/passwd || adduser --disabled-password --home=/home/bogo --ingroup filter -g "Bogofilter" bogo
33 [ -f "/etc/postfix/master.cf" ] && grep "/usr/bin/postfix-filter.sh" /etc/postfix/master.cf || {
34 echo "bogofilter unix - n n - - pipe" >> /etc/postfix/master.cf
35 echo " flags=R user=bogo argv=/usr/bin/postfix-filter.sh -f ${sender} -- ${recipient}" >> /etc/postfix/master.cf
37 /etc/init.d/populate-volatile.sh update