#!/bin/sh #---------------------------------------------------------------------------------- # /var/install/bin/antispam-show-addresses-in-awl - show addresses in awl # # Copyright (c) 2001-2024 The Eisfair Team, team(at)eisfair(dot)org # # Creation: 2012-06-24 jed # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------------- # read eislib etc. . /var/install/include/eislib #exec 2>/tmp/antispam-show-addresses-in-awl-trace-$$.log #set -x pgmname=`basename $0` antispam_config_path=/var/antispam configfile=/etc/config.d/antispam awlfile=${antispam_config_path}/spamassassin/auto-whitelist tmpfile=/tmp/antispam-addresses-in-awl.txt doctitle="addresses in AWL database" clrhome mecho --info "Antispam show addresses in AWL" mecho if [ -f ${configfile} ] then # read configuration . ${configfile} if [ "${START_ANTISPAM}" = "yes" ] then if [ "${ANTISPAM_AUTO_WHITELIST}" = "yes" ] then if [ -f ${awlfile} ] then # write table header { # -12.0 (-12.0/1) -- sylo16_dzd6856mgfg@members.ebay.de|ip=66.211 echo " AVG TOTAL" echo " SCORE SCORE / COUNT EMAIL | ip=IPBASE" echo " ------ ------------- --------------------------------------------" } > ${tmpfile} # read addresses from AWL sa-awl ${awlfile} | sort -n >> ${tmpfile} # check if show-doc.cui supports colors color='' frame='' if $(grep -qE "^MENU=['\"]/var/install/bin/show-menu['\"]" /etc/config.d/setup) then color='--nocolor' frame='--noframe' fi /var/install/bin/show-doc.cui ${color} ${frame} --title "${doctitle}" ${tmpfile} rm -f ${tmpfile} else mecho --error "Antispam auto-whitelist database couldn't be found!" fi else mecho --warn "Antispam auto-whitelist function is currently disabled!" fi else mecho --warn "Antispam package is currently disabled!" fi else mecho --error "Configuration file '${configfile}' doesn't exist!" fi exit 0