mail11v3 problem
elsen at esat.kuleuven.ac.be
elsen at esat.kuleuven.ac.be
Wed Apr 11 07:10:30 AEST 1990
In article <1990Apr8.215643.19948 at binky.Binky.COM>, roger at binky.Binky.COM (Roger Taranto) writes:
> We're getting a number of "Lost connection to remote node while
> confirming delivery" errors from mail11v3. When I run sendmail
> with -v, the mail delivery is fine until the QUIT command. Then,
> we get the above error. What could be causing this?
>
> Thanks,
> -Roger
> roger at binky.Binky.COM ...!{pacbell,ucbcad,rtech}!binky!roger
This problem occurs upon mail delivery towards VMS hosts which
apparently can't deal with To: lines in excess of 511 bytes
(if I remember the number correctly...)
Anyway here's a script which 'attacks' this problem : we run
it daily from cron.
------------------------------Cut here------------------------------------------
#!/bin/csh
#
# Script inorder to process mails to DECnet which got deferred
# with a status as in 'Lost connection to remote node while
# confirming delivery'
# Caused by a bug in mail11 on behalf of the VMS side which doesn't
# accept To: (From,CC,Subject...) lines longer then 511 bytes.
#
# Eddy Verbeemen
# Marc Elsen
#
# Version 1.0 : 13/11/89 12:40
#
# Update Logfile (/usr/adm/princess.log)
#
/bin/rm /usr/adm/princess.log.7
/bin/mv /usr/adm/princess.log.6 /usr/adm/princess.log.7
/bin/mv /usr/adm/princess.log.5 /usr/adm/princess.log.6
/bin/mv /usr/adm/princess.log.4 /usr/adm/princess.log.5
/bin/mv /usr/adm/princess.log.3 /usr/adm/princess.log.4
/bin/mv /usr/adm/princess.log.2 /usr/adm/princess.log.3
/bin/mv /usr/adm/princess.log.1 /usr/adm/princess.log.2
/bin/mv /usr/adm/princess.log.0 /usr/adm/princess.log.1
/bin/mv /usr/adm/princess.log /usr/adm/princess.log.0
/bin/cp /dev/null /usr/adm/princess.log
/bin/chmod 664 /usr/adm/princess.log
#
#
#
set message="Lost connection to remote node while confirming delivery"
#
# Process each control file in the spool directory
#
cd /usr/spool/mqueue
set logfile = /usr/adm/princess.log
foreach qfile (qf*)
#
set lfile=`echo $qfile | sed -n "s/^q/l/p"`
#
# Check for 'message'
#
grep "$message" $qfile > /dev/null
if ($status == 0 ) then
#
# if lockfile present don't touch it!
#
if (! -e $lfile) then
#
# Create Lock file to keep sendmail from processing this mail
# while we are busy
#
cp /dev/null $lfile
#
# Set dfile = name of corresponding data file (message body)
# Set recipient = name of mail destination
# Set sender = name of sender
#
set dfile=`sed -n "s/^D//p" $qfile`
set recipient=`sed -n "s/^R//p" $qfile`
set sender=`sed -n "s/^S//p" $qfile`
echo `date` $qfile >>! $logfile
echo "From:" $sender >>! $logfile
echo "To:" " " $recipient >>! $logfile
echo "-----------------------------------" >>! $logfile
#
# Insert Dummy header at the end of the queue file to simplify
# sed addressing through regular expressions in qfile
#
echo "Hdummyheader" >> $qfile
#
# Append To header in qfile to dfile
#
echo "------------" >> $dfile
echo "Original-To: " >> $dfile
echo "These lines were written by esat.kuleuven.ac.be to permit\
delivery on VMS hosts." >> $dfile
#
sed -n "/^HTo:/,/^H/p" $qfile | sed -e "s/^HTo:/ /" -e '$d'\
>> $dfile
#
# Modify To line in control file
#
set headlen=`sed -n "/^HTo:/=" $qfile `
set tolen=`sed -n "/^HTo:/,/^H/p" $qfile | wc -l `
set filelen=`wc -l < $qfile`
@ headlen--
@ tolen--
@ taillen = $filelen - $headlen
@ taillen -= $tolen
set tempfile = tmp$$
#
head -$headlen $qfile > $tempfile
echo "HTo:" $recipient >> $tempfile
tail -$taillen $qfile >> $tempfile
#
sed '$d' $tempfile >! $qfile
/bin/rm $tempfile
#
# Delete Lock file
#
/bin/rm -f $lfile
endif
endif
#
end
--------------------------------------------------------------------------------
Marc Elsen (System Manager/Software Engineer)
Katholieke Universiteit Leuven
Dep. E.S.A.T.
Kard. Mercierlaan 94
3030 HEVERLEE
Belgium
tel. 32(0)16220931(ext. 1080)
EMAIL : elsen at esat.kuleuven.ac.be
...!kulcs!kulesat!elsen (UUCP)
elsen%kulesat.uucp at blekul60 (BITNET)
psi%02062166012::elsen (PSI MAIL)
More information about the Comp.unix.ultrix
mailing list