04-19-2002
metamail
Hi there. I have a problem with some files I am trying to process. It goes as follows:
I receive an email with a MIME attachment
I use metamail to extract the data to a flat file named "email.txt"
I decode "email.txt" using metamail
This works great with one tiny issue
Information in the file that I receive is 1000 rows of invoice data that needs to be stripped of ANY extra characters that may be in the file, so that all I am left with is the pure data.
But at the end of every file is something like:
------_=_NextPart_000_01C1E6F8.678CC080--
or like this:
------_ÿextPart_000_01C1E6F8.678CC080-- (once I have metamailed it)
I need to be able to get rid of these extra characters some how. I thought of using grep somehow (?) or some other techinique, but these "weird" characters seems to be changing with every file, so I am at a loss on how to do this.
I am using a PERL program that calls metamail using "system(..)", so maybe there is a cool trick in PERL as well?
If anyone could help, I would really appreciate it.
Thanks in advance
4 More Discussions You Might Find Interesting
1. Programming
Hi Guys.
I have downloaded metamail from internet e I´m trying to compile it at a SCO 5.0.5. In this server it´s working fine (let´s name it as mission1)
i´m using the developer package in this server (mission1) and when I use mailto, i got the e-mail fine. It´s forwarding to a exchange server... (2 Replies)
Discussion started by: ahnishimi
2 Replies
2. Programming
Hi. I´m have installed the metamail from skunkware and when I´m trying to use mailto (the complete script is bellow), I got this message:
# mailto
To: test@bla.com
Subject: test
~/2048000
Set splitsize to 2048000
~*
Please choose which kind of data you wish to insert:
0: A raw file,... (2 Replies)
Discussion started by: ahnishimi
2 Replies
3. Solaris
Hi All,
We are trying to Load Metamail on our Solaris 10 Server but are not able to.
This is what we get:
m5k604d1@root# pwd
/export/home/xpvh76/mm2.7/src
m5k604d1@root# /usr/ccs/bin/make
(cd metamail ; make CONFIGDIR=../. CFLAGS="-g -I. " CC="cc" LDLIBS="")
sh: make: not found... (1 Reply)
Discussion started by: paragkhanore
1 Replies
4. Solaris
Hi All,
We have been trying to Install Metamail on our Solaris 10 server but have failed to do so.
We are a bit topo short of time here so are now trying to Explore any Meta Mail alternatives.
What we basically want to do is:
Server will recieve email, Procmail will recieve the email... (0 Replies)
Discussion started by: paragkhanore
0 Replies
LEARN ABOUT SUSE
patch-metamail
patch-metamail(1) General Commands Manual patch-metamail(1)
NAME
patch-metamail - Install a patch to the latest metamail release
SYNOPSIS
patch-metamail source-tree-root patch-number [hostname [dirname [prefix]]]
DESCRIPTION
The patch-metamail program will attempt to retreive a patch file for the metamail distribution, using anonymous ftp to a trusted server,
and then install that patch in your local copy of the distribution.
The first two arguments, which are required, are the root directory of your local copy of the metamail source directory, and the patch num-
ber. The former is site-dependent, the latter is patch-dependent.
In general, patch-metamail is intended to be called via metamail, with a mailcap entry like the following:
application/x-metamail-patch;patch-metamail source-tree-root %{patchnumber}; needsterminal
The default values for the host to ftp to, the directory name to retrieve the file from, and the patch file name prefix are hard-wired to
thumper.bellcore.com, pub/nsb, and "mm.patch.". While you can override these on the command line, it would be a big mistake to make these
parameterized based on the contents of a mail message, because then someone could spoof you into retrieving a new version of metamail with
a Trojan horse from their site! However, as long as you retain control over what host and directory the patches are retrieved from, this
program is reasonably safe (as safe as the host you're depending on, anyway).
SEE ALSO
metamail(1)
COPYRIGHT
Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
Permission to use, copy, modify, and distribute this material for any purpose and without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies, and that the name of Bellcore not be used in advertising or publicity
pertaining to this material without the specific, prior written permission of an authorized representative of Bellcore. BELLCORE MAKES NO
REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES.
AUTHOR
Nathaniel S. Borenstein, Bellcore
Release 1 patch-metamail(1)