--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: metamail: Does not provide filenames for attachments
- From: Immanuel Halupczok <debian-bugs@karimmi.de>
- Date: Mon, 08 Aug 2005 16:10:56 +0200
- Message-id: <E1E28LA-00019C-FH@pcpool06.mathematik.uni-freiburg.de>
Package: metamail
Version: 2.7-47
Severity: wishlist
Tags: patch
I'd like to be able to provide a filename for attachments sent with
metasend. I provide a patch which allows this:
With the new option "-A xxx", one can supply a filename. (This will add
a line 'Content-Disposition: attachment; filename="xxx"'; without the
-A option, no Content-Disposition-line will be added.)
Some mail programs (sylpheed, for example), use the Content-Description
as a filename when it exists, but including the space at the beginning,
after the ":", if there is one. So to get the filename correct even in
sylpheed, I need to be able to turn off the Content-Description-line.
I therefore changed the behaviour such that no Content-Description-line
is created when the -D option is left out. (Anyway, the default
Content-Description-line was "An object packed by metasend" which
probably nobody really wanted.)
I only patched the program; I didn't modify the man-page accordingly.
Note that I'm not an experienced shell programmer, so perhaps someone
should have a quick look over the new code.
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.30-pcpool
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Versions of packages metamail depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libncurses5 5.4-4 Shared libraries for terminal hand
-- no debconf information
*** metasend Mon Aug 8 15:47:50 2005
--- metasend_new Mon Aug 8 16:09:16 2005
***************
*** 42,48 ****
ouputfile=
multipartsubtype=mixed
! cdescrip="An object packed by metasend"
isentity=0
newid=`date | tr " :" "__"`
cid="<${newid}_$idctr@${hname}>"
--- 42,49 ----
ouputfile=
multipartsubtype=mixed
! cdescrip= # -Immi
! attachfilename= # -Immi
isentity=0
newid=`date | tr " :" "__"`
cid="<${newid}_$idctr@${hname}>"
***************
*** 198,203 ****
--- 199,215 ----
cdescrip=$1
shift ;;
+ # begin immi
+ -A) shift
+ if test -z "$*"
+ then
+ echo "-A requires a following argument, the attachment file name"
+ exit 1
+ fi
+ attachfilename=$1
+ shift ;;
+ #end immi
+
-E) isentity=1
shift ;;
***************
*** 241,246 ****
--- 253,259 ----
eval datafile${multipart}=$datafile
eval encode${multipart}=$encode
eval cdescrip${multipart}=\"$cdescrip\"
+ eval attachfilename${multipart}=\"$attachfilename\" # -Immi
eval cid${multipart}=\"$cid\"
eval isentity${multipart}=$isentity
eval encodingprog${multipart}=\"\$encodingprog\"
***************
*** 252,258 ****
newid=`date | tr " :" "__"`
cid="<${newid}_$idctr@${hname}>"
idctr=`expr $idctr + 1`
! cdescrip="An object packed by metasend"
isentity=0
multipart=`expr $multipart + 1`
shift ;;
--- 265,272 ----
newid=`date | tr " :" "__"`
cid="<${newid}_$idctr@${hname}>"
idctr=`expr $idctr + 1`
! cdescrip= # -Immi
! attachfilename= # -Immi
isentity=0
multipart=`expr $multipart + 1`
shift ;;
***************
*** 354,362 ****
eval encode${multipart}=$encode
eval encodingprog${multipart}=\"\$encodingprog\"
eval cdescrip${multipart}=\"$cdescrip\"
eval cid${multipart}=\"$cid\"
eval isentity${multipart}=$isentity
! cdescrip="An object packed by metasend"
isentity=0
ctype=
datafile=
--- 368,378 ----
eval encode${multipart}=$encode
eval encodingprog${multipart}=\"\$encodingprog\"
eval cdescrip${multipart}=\"$cdescrip\"
+ eval attachfilename${multipart}=\"$attachfilename\" # -Immi
eval cid${multipart}=\"$cid\"
eval isentity${multipart}=$isentity
! cdescrip= # -Immi
! attachfilename= # -Immi
isentity=0
ctype=
datafile=
***************
*** 450,455 ****
--- 466,472 ----
eval datafile${multipart}=$datafile
eval encode${multipart}=$encode
eval cdescrip${multipart}=\"$cdescrip\"
+ eval attachfilename${multipart}=\"$attachfilename\" # -Immi
eval cid${multipart}=\"$cid\"
eval isentity${multipart}=$isentity
eval encodingprog${multipart}=\"\$encodingprog\"
***************
*** 504,510 ****
then
eval echo "Content-ID: \$cid$i" >> $fname
eval echo "Content-type: \$ctype$i" >> $fname
! eval echo "Content-Description: \$cdescrip$i" >> $fname
eval echo "Content-Transfer-Encoding: \$encode$i" >> $fname
echo "" >> $fname
fi
--- 521,538 ----
then
eval echo "Content-ID: \$cid$i" >> $fname
eval echo "Content-type: \$ctype$i" >> $fname
! #begin immi
! eval cdescrip=\$cdescrip$i
! if test ! -z "$cdescrip"
! then
! echo "Content-Description: $cdescrip" >> $fname
! fi
! eval attachfilename=\$attachfilename$i
! if test ! -z "$attachfilename"
! then
! echo "Content-Disposition: attachment; filename=\"$attachfilename\"" >> $fname
! fi
! #end immi
eval echo "Content-Transfer-Encoding: \$encode$i" >> $fname
echo "" >> $fname
fi
--- End Message ---
--- Begin Message ---
Source: metamail
Source-Version: 2.7-52
We believe that the bug you reported is fixed in the latest version of
metamail, which is due to be installed in the Debian FTP archive:
metamail_2.7-52.diff.gz
to pool/main/m/metamail/metamail_2.7-52.diff.gz
metamail_2.7-52.dsc
to pool/main/m/metamail/metamail_2.7-52.dsc
metamail_2.7-52_i386.deb
to pool/main/m/metamail/metamail_2.7-52_i386.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 321968@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Anibal Monsalve Salazar <anibal@debian.org> (supplier of updated metamail package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.7
Date: Wed, 19 Jul 2006 12:53:40 +1000
Source: metamail
Binary: metamail
Architecture: source i386
Version: 2.7-52
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Anibal Monsalve Salazar <anibal@debian.org>
Description:
metamail - implementation of MIME
Closes: 321968 357163
Changes:
metamail (2.7-52) unstable; urgency=low
.
* QA Group upload.
* Set Standards-Version to 3.7.2.
* Set DH_COMPAT to 5.
* Fixed "Does not provide filenames for attachments", closes:
#321968. Patch by Immanuel Halupczok <debian-bugs@karimmi.de>.
* Fixed "dumps core with -w option", closes: #357163.
Patch by Justin Pryzby <justinpryzby@users.sourceforge.net>.
Files:
dedcb4009aa1b4e8699535d90d9ba60d 597 mail optional metamail_2.7-52.dsc
43d21022f048b6610932cf6f6f46b516 322166 mail optional metamail_2.7-52.diff.gz
4178ff25ea46f38392a5f37cd58b1e81 151112 mail optional metamail_2.7-52_i386.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFEvafnipBneRiAKDwRAkSgAJwNc6rEmGwWo3ncylthCblwmQAHhgCfR5zH
Tx+32nuzAkVvLHmogsyevs8=
=mSb/
-----END PGP SIGNATURE-----
--- End Message ---