File: postinst

package info (click to toggle)
smtp-refuser 1.0.4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 84 kB
  • ctags: 18
  • sloc: ansic: 209; sh: 56; makefile: 43
file content (36 lines) | stat: -rw-r--r-- 1,016 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
set -e

case $1 in
	configure)
		if [ ! -f /etc/smtp-refuser.conf ]; then
			touch /etc/smtp-refuser.conf ;
		fi
		if [ `wc -l </etc/smtp-refuser.conf` != 2 ]; then
			echo -n "Do you wish to configure now? [Y/n] "
			read REPLY
			case $REPLY in
				[nN]*) ;;
				*) echo ; /usr/sbin/smtp-refuserconfig ;;
			esac
			echo "smtp-refuser may be set up again by running /usr/sbin/smtp-refuserconfig.";
		fi
		;;
esac

# verisim.com no longer exists, so if this is here it's probably
# an old and unmodified copy of smtp-refuser's rules ... warn the
# administrator.

if grep -q -i 'gatekeeper\.verisim\.com' /etc/hosts.allow; then
    echo "WARNING: Your /etc/hosts.allow file appears to contain" ;
    echo "some very old and possibly harmful smtp-refuser rules." ;
    echo ;
    echo "Please read /usr/share/doc/smtp-refuser/examples/hosts.allow.sample" ;
    echo "and then manually update your /etc/hosts.allow rules." ;
    echo ;
    echo "Press a key to continue..." ;
    read REPLY
fi

#DEBHELPER#