PREIN
/bin/sh
/usr/sbin/useradd -u 47 -d /var/spool/mqueue -r -s /dev/null mailnull >/dev/null 2>&1 || :
PREUN
/bin/sh
if [ $1 = 0 ]; then service sendmail stop > /dev/null 2>/dev/null || :; /sbin/chkconfig --del sendmail; fi;
POSTIN
/bin/sh
#
# Convert old format to new
#
if [ -f /etc/mail/deny ] ; then
cat /etc/mail/deny | \
awk 'BEGIN{ print "# Entries from obsoleted /etc/mail/deny"} \
{print $1" REJECT"}' >> /etc/mail/access
cp /etc/mail/deny /etc/mail/deny.rpmorig
fi
for oldfile in relay_allow ip_allow name_allow ; do
if [ -f /etc/mail/$oldfile ] ; then
cat /etc/mail/$oldfile | \
awk "BEGIN { print \"# Entries from obsoleted /etc/mail/$oldfile\" ;} \
{ print \$1\" RELAY\" }" >> /etc/mail/access
cp /etc/mail/$oldfile /etc/mail/$oldfile.rpmorig
fi
done
#
# Oops, these files moved
#
if [ -f /etc/sendmail.cf -a ! -f /etc/mail/sendmail.cf ] ; then
sed -e 's/^O AutoRebuildAliases/#O AutoRebuildAliases/' /etc/sendmail.cf > /etc/mail/sendmail.cf
mv /etc/sendmail.cf /etc/sendmail.cf.rpmorig
fi
if [ -f /etc/sendmail.cw ] ; then
cat /etc/sendmail.cw | \
awk 'BEGIN { print "# Entries from obsoleted /etc/sendmail.cw" ;} \
{ print $1 }' >> /etc/mail/local-host-names
cp /etc/sendmail.cw /etc/sendmail.cw.rpmorig
fi
#
# Rebuild maps (next reboot will rebuild also)
#
{ /usr/bin/newaliases
for map in virtusertable access domaintable mailertable
do
if [ -f /etc/mail/${map} ] ; then
/usr/sbin/makemap hash /etc/mail/${map} < /etc/mail/${map}
sleep 1
fi
done
} > /dev/null 2>&1
if [ $1 = 1 ]; then /sbin/chkconfig --add sendmail; else if [ -f /var/lock/subsys/sendmail ]; then service sendmail restart > /dev/null 2>/dev/null || : ; fi; fi;
POSTUN
/bin/sh
if [ $1 = 0 ]; then
/usr/sbin/userdel mailnull > /dev/null 2>&1 || :
fi
Triggers
sendmail <
8.10.0
/bin/sh
/sbin/chkconfig --add sendmail