[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bencode/bdecode'd mail broke in new version




I recently moved from Zmailer 2.2 to zmailer-2.2.1-mea-940225
and broke the part of our setup which creates the UUCP paths
database.

Short story:

	the news machine gets a new uucp map (posted to comp.mail.maps), 
	bencode's it and sends it to the machine running the new version
	of zmailer (the news machine is running the old version
	of zmailer if that makes a difference).  The machine running
	the new version of zmailer tries to bdecode it and gets part
	way through and then just puts garbage in the output stream.  
	I can find no error messages anywhere but only the beginning of 
	the file gets properly bdecode'd -- partway through the file I 
	start getting garbage.   I can ftp (ooohh... another aftershock .. 
	ok, it's over .. that was pretty big!) the bencoded file over and 
	bdecode it by hand without any problems but as soon as I send it 
	through the mail system, it doesn't work.

This worked fine before the zmailer upgrade.

Any hints, tips, suggestions?

--Cheryl Bien
  The Aerospace Corporation
  bien@aero.org

More details
============

Here's what the bdecode output looks like:

============================================================================
(mail#379) more /tmp/cheryl
Path: news.aero.org!usc!howland.reston.ans.net!agate!headwall.Stanford.EDU!rutgers!pleasant
From: uucpmap@rutgers.rutgers.edu (UUCP Mapping Project)
Newsgroups: comp.mail.maps
Subject: UUCP map for u.nld.2
Message-ID: <Mar.20.10.56.34.1994.6633@rutgers.rutgers.edu>
Date: 20 Mar 94 15:56:35 GMT
Expires: 4 May 94 15:56:34 GMT
Sender: pleasant@rutgers.rutgers.edu
Lines: 1458
Approved: pleasant@rutgers.edu (Mel Pleasant)
Supersedes: <Mar.19.11.03.10.1994.1631@rutgers.rutgers.edu>

:  This is a shell archive.
:  Remove everything above this line and
:  run the following text with /bin/sh to create:
:  u.nld.2
: This archive created: Sun Mar 20 10:56:32 1994
echo shar: extracting u.nld.2
cat << 'SHAR_EOF' > u.nld.2
file {u.nld.2} # of 0,1,2,3,4,100; changes to: uucpmap@nluug.nl
# Copyright 1989-1994 by EurOpen. All rights reserved.
# Permission is granted for non-commercial use.
# #W lines show 2 dates: date of introduction and date of last change.
# Last change: Fri Mar 18 13:29:33 MET 1994

#N .encore.nl, encore.nl, gouldnl.encore.nl, gouldnl
#S
#O Encore Computer Nederland B.V.
#C Wytze van der Raay
#E wytze@encore.nl
#T +31 3465 68294
#P P.O. Box 1666, NL-3600 BR Maarssenbroek, Netherlands
#L 5 08 E / 52 08 N
#R
#U
#W piet@cwi.nl 851025, martijn@NL.net 930610
#

#N fcs01, .fcs01.nl, fcs01.nl
#S
#O Fokker Aircraft B.V.
#C C. Wittebol
#E postmaster@fcs01.nl
#T +31 20 6053457
#P P.O. Box 12222, NL-1100 AE Amsterdam, Netherlands
#L
#R
#U
#W martijn@NL.net 931006, martijn@NL.net 931006
#

#N fdcug, .oss.nl, oss.nl
#S
#O O.S. Support
#C A. van Erven
#E postmaster@oss.nl
#T +31 2240 18499
#P P.O. Box 348, NL-1740 AH Schagen, Netherlands
#L
#R
#U
#W martijn@NL.net 940207, martijn@NL.net 940207
#

#N finemac, .finecl

                  [XX\
                      TBSBQ[XXY\[PBT
                                    KZ[\QB\]\]\[XX\
                                                   UJLLH^LLH^LNL^
[etc. -- lots more garbage]
============================================================================

On the news machine, I ran the following:

	cd /news/comp/mail/maps
	cat 26566 | /bin/bencode | /usr/ucb/mail -s "UUCP Map" bien@mail.aero.org

I ftp that file to the mail machine and then run the following by hand:

	(mail#170) cat /tmp/z | /usr/local/zmail/bin/recmaps
	/usr/local/zmail/bin/bdecode: (stdin): Corrupted input (CRC mismatch)

(We always get that CRC error -- it's not a problem -- or should I say, I know
it never used to be a problem.) 

Anyways, that works fine (the entire file is properly decoded).  The map 
is unpacked without any problems.

Next, I tried this:

	mail uucp-maps < /tmp/z

and it fails.

uucp-maps is aliased to:

	uucp-maps:"|/usr/local/zmail/bin/recmaps"

(mail#387) cat /usr/local/zmail/bin/recmaps
#!/bin/sh
#

/usr/local/zmail/bin/bdecode | /usr/local/zmail/bin/bodysnatch news news /usr/local/zmail/bin/uuhosts uuhosts -x

if [ $? -ne 0 ]; then
    exit 75
fi

exit 0
(mail#388) 

If I change this file to pipe the bdecode output directly
to /tmp/cheryl, I see that only the first part of the file was 
properly bdecode'd (example included above).