Re: [foxboro] Sendmail error
- From: Kevin FitzGerrell <fitzgerrell@xxxxxxxxxxxxxxx>
- To: "foxboro@xxxxxxxxxxxxx" <foxboro@xxxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 06:49:59 +1200 (NZST)
Tim,
While the fix given in the HH works, our mailserver didn't like the
letterbug+period format. To resolve this, we added "local" after the period.
Instead of:
151.128.8.65 AW51B1 AW51B1. loghost
Try:
151.128.8.65 AW51B1 AW51B1.local loghost
Additionally, you'll soon realize that nearly every commit or release upgrade
you have to re-apply these changes.
I wrote the script below to run after each commit to re-apply the sendmail
fixes. Because it rmounts each workstation in the network, before running make
sure there are no rmounted workstions (I'll probably rewrite this with rsh when
I get around to it).
Regards,
Kevin FitzGerrell
#!/bin/sh
#
# fix_sendmail script to be run on AW51E1
#
cd /tmp
# within the egrep parenthesis add this stations letterbug
# also add any other stations to skip (70 series, etc.)
STATIONS=`grep 151 /etc/hosts | egrep -v '(AW51E1|WPXP01)' | awk '{print $2}'`
for STATION in $STATIONS
do
echo "editing hosts file on $STATION"
rmount $STATION /rem/r0
ADDRESS=`grep 151 /etc/hosts | grep $STATION | awk '{print $1}'`
if [ `grep $ADDRESS /rem/r0/etc/hosts | grep -c local` -eq 0 ]; then
echo ":g/$ADDRESS/s/$STATION/$STATION\t$STATION.local/" > ex.script
echo ":w!" >> ex.script
echo ":q" >> ex.script
ex -s /rem/r0/etc/hosts < ex.script
sleep 1
else
echo "already modified"
fi
rumount $STATION
sleep 1
done
# now do this station, replace your stations letterbug below
STATION="AW51E1"
echo "editing hosts file on $STATION"
ADDRESS=`grep 151 /etc/hosts | grep $STATION | awk '{print $1}'`
if [ `grep $ADDRESS /etc/hosts | grep -c local` -eq 0 ]; then
echo ":g/$ADDRESS/s/$STATION/$STATION\t$STATION.local/" > ex.script
echo ":w!" >> ex.script
echo ":q" >> ex.script
ex -s /etc/hosts < ex.script
else
echo "already modified"
fi
rm ex.script
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
foxboro mailing list: http://www.freelists.org/list/foxboro
to subscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe: mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
- References:
- Re: [foxboro] Sendmail error
- From: Lowell, Tim:
Other related posts:
- » Re: [foxboro] Sendmail error
- » Re: [foxboro] Sendmail error
- » Re: [foxboro] Sendmail error
- » Re: [foxboro] Sendmail error
- » Re: [foxboro] Sendmail error
- » Re: [foxboro] Sendmail error
- Re: [foxboro] Sendmail error
- From: Lowell, Tim: