Browse Source

Merge pull request #2843 from MikePetullo/bogofilter

bogofilter: postfix script now reads bogofilter_dir from bogofilter conf
lilik-openwrt-22.03
Hannu Nyman 9 years ago
committed by GitHub
parent
commit
0ba5d3bb24
2 changed files with 12 additions and 3 deletions
  1. +1
    -1
      mail/bogofilter/Makefile
  2. +11
    -2
      mail/bogofilter/files/postfix-bogofilter

+ 1
- 1
mail/bogofilter/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=bogofilter PKG_NAME:=bogofilter
PKG_VERSION:=1.2.4 PKG_VERSION:=1.2.4
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_LICENSE:=GPLv2 PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING PKG_LICENSE_FILES:=COPYING


+ 11
- 2
mail/bogofilter/files/postfix-bogofilter View File

@ -1,7 +1,10 @@
#!/bin/sh #!/bin/sh
FILTER=/usr/bin/bogofilter FILTER=/usr/bin/bogofilter
FILTER_DIR=/mnt/sda1/var/spool/bogofilter
# Attempt to read from bogofilter configuration.
FILTER_DIR=$(cat /etc/bogofilter.cf | sed 's/#.*//g' | grep ^bogofilter_dir | awk -F = '{ print $2 }')
# WARNING! The -i is crucial, else you may see # WARNING! The -i is crucial, else you may see
# messages truncated at the first period that is alone on a line # messages truncated at the first period that is alone on a line
# (which can happen with several kinds of messages, particularly # (which can happen with several kinds of messages, particularly
@ -12,7 +15,13 @@ FILTER_DIR=/mnt/sda1/var/spool/bogofilter
# misleading traces in headers, such as local address # misleading traces in headers, such as local address
# canonicalizations. # canonicalizations.
POSTFIX="/usr/sbin/sendmail -G -i" POSTFIX="/usr/sbin/sendmail -G -i"
export BOGOFILTER_DIR=/etc/bogofilter
# No bogofilter_dir set in /etc/bogofilter.cf; fall back on directory
# which persists across reboots.
if [ -z "$FILTER_DIR" ]; then
FILTER_DIR=/etc/bogofilter
export BOGOFILTER_DIR=$FILTER_DIR
fi
# Exit codes from <sysexits.h> # Exit codes from <sysexits.h>
EX_TEMPFAIL=75 EX_TEMPFAIL=75


Loading…
Cancel
Save