Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > 4465b95acc418adc4b0cc81ea229856f > files > 50

fetchmail-6.3.20-1.1.mga1.i586.rpm

#!/bin/sh
# setup hostname in /etc/hosts.  use IP if no name available.
echo cyberhq > /tmp/local_name
echo $4 > /tmp/ip
host $4 | fgrep Name | cut -c7- > /tmp/ip_name
if [ ! -s /tmp/ip_name ]; then
    echo $4 > /tmp/ip_name
fi
cat /tmp/ip_name > /etc/sendmail.cw
paste /tmp/ip /tmp/ip_name /tmp/local_name > /tmp/host_bottom
cat /etc/hosts.top /tmp/host_bottom > /etc/hosts
rm /tmp/ip /tmp/ip_name /tmp/host_bottom /tmp/local_name
# Restart sendmail with new name.
kill -HUP `head -1 /var/run/sendmail.pid`
# Start fetchmail as root to fetch our mail.
fetchmail