Sophie

Sophie

distrib > PLD > ra > i686 > media > dist > by-pkgid > 9c668fec470f561348070b5862cd3c41 > scriptlet

postfix-1.1.11-7.i686.rpm

PREIN

/bin/sh
if [ -n "`/usr/bin/getgid postfix`" ]; then
	if [ "`getgid postfix`" != "62" ]; then
		echo "Error: group postfix doesn't have gid=62. Correct this before installing postfix." 1>&2
		exit 1
	fi
else
	/usr/sbin/groupadd -g 62 -r -f postfix
fi
if [ -n "`/usr/bin/getgid maildrop`" ]; then
	if [ "`/usr/bin/getgid maildrop`" != "63" ]; then
		echo "Error: group maildrop doesn't have gid=63. Correct this before installing postfix." 1>&2
		exit 1
	fi
else
	/usr/sbin/groupadd -g 63 -r -f maildrop
fi
if [ -n "`/bin/id -u postfix 2>/dev/null`" ]; then
	if [ "`/bin/id -u postfix`" != "62" ]; then
		echo "Error: user postfix doesn't have uid=62. Correct this before installing postfix." 1>&2
		exit 1
	fi
else
	/usr/sbin/useradd -u 62 -r -d /var/spool/postfix -s /bin/false -c "Postfix User" -g postfix postfix 1>&2
fi

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	if [ -f /var/lock/subsys/postfix ]; then
		/etc/rc.d/init.d/postfix stop >&2
	fi
	/sbin/chkconfig --del postfix
fi

POSTIN

/bin/sh
/sbin/ldconfig
if ! grep -q "^postmaster:" /etc/mail/aliases; then
	echo "Adding Entry for postmaster in /etc/mail/aliases" >&2
	echo "postmaster:	root" >>/etc/mail/aliases
fi
if ! grep -q "^myhostname" /etc/mail/main.cf; then
	postconf -e myhostname=`/bin/hostname -f`
fi

newaliases
/sbin/chkconfig --add postfix
if [ -f /var/lock/subsys/postfix ]; then
	/etc/rc.d/init.d/postfix restart >&2
else
	echo "Run \"/etc/rc.d/init.d/postfix start\" to start postfix daemon." >&2
fi

POSTUN

/bin/sh
/sbin/ldconfig
if [ "$1" = "0" ]; then
	/usr/sbin/groupdel maildrop 2> /dev/null
	/usr/sbin/userdel postfix 2> /dev/null
	/usr/sbin/groupdel postfix 2> /dev/null
fi

Triggers

postfix < 1:1.1.2

/bin/sh
sed -e 's/^\(pickup[ 	]\+fifo[ 	]\+[^ 	]\+[ 	]\+\)[^ 	]\+\([ 	]\)/\1-\2/;
s/^\(cleanup[ 	]\+unix[ 	]\+\)[^ 	]\+\([ 	]\)/\1n\2/' /etc/mail/master.cf \
	> /etc/mail/master.cf.rpmtmp
mv -f /etc/mail/master.cf.rpmtmp /etc/mail/master.cf