File: activate-sendmail

package info (click to toggle)
postfix 2.3.8-2%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 15,744 kB
  • ctags: 11,426
  • sloc: ansic: 81,810; makefile: 10,743; sh: 7,874; perl: 2,468; awk: 41
file content (24 lines) | stat: -rwxr-xr-x 721 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

# Written by Gerben Wierda, Oct 2001. I waive every copyright on this and
# I also do not give any warranty.

. ./defines

. ./deactivate-postfix

# Activate binaries
if [ ! -e ${SENDMAILBACKUPDIR}/sendmail ]
then
	echo "Something is wrong: there is no existing sendmail binary backup"
	exit 1;
else
	echo "Restoring sendmail versions of sendmail programs from backup..."
	(cd ${SENDMAILBACKUPDIR}; tar cf - sendmail) | (cd /usr/sbin; tar xf -) 
	(cd ${SENDMAILBACKUPDIR}; tar cf - newaliases) | (cd /usr/bin; tar xf -) 
	(cd ${SENDMAILBACKUPDIR}; tar cf - mailq) | (cd /usr/bin; tar xf -)
fi

# Activate sendmail in /etc/hostconfig
/usr/bin/perl -pi -e 's/MAILSERVER=-NO-/MAILSERVER=-YES-/g' /etc/hostconfig