[ale] Extracting from EXISTING /var/spool/mqueue file
Michael H. Warfield
mhw at WittsEnd.com
Fri Aug 16 05:53:09 EDT 2013
On Thu, 2013-08-15 at 22:33 -0500, Brian Mathis wrote:
> That's base64 encoded. Do this:
>
>
> 1. Copy the file out of the queue
>
> 2. Open it up in a text editor and remove everything except the
> encoded junk
>
> 3. Run: base64 -d encoded_junk_file > thisisthe.pdf
>
That will probably work just fine but you may also try "mimeexplode",
which will unpack the separated Mime attachments into directories and
files. He did say there were two attachments and it looked like it was
nested Mime.
>
> ❧ Brian Mathis
Regards,
Mike
>
> On Thu, Aug 15, 2013 at 5:03 PM, Lightner, Jeff <JLightner at water.com>
> wrote:
> OK – Given I have unsent email in /var/spool/mqueue how can I
> extract an attachment from the file?
>
>
>
> Note I am NOT asking how to SEND attachments – the attachment
> is already in the file. What I can’t figure out is how I
> could get just the attachment and either view it on the local
> host or forward it in a new email.
>
>
>
> So for example for a given message I have two files:
>
> -rw------- 1 root smmsp 332042 Aug 15 10:58 dfr7FEwI9R025512
>
> -rw------- 1 root smmsp 1163 Aug 15 14:02 qfr7FEwI9R025512
>
>
>
> The qfr is the one with the original header information.
>
>
>
> The dfr is the one with the actual mail body which in this
> case is mainly a pdf attachment.
>
>
>
> What I see in the dfr is something along the lines of:
>
>
>
> ------=_Part_288_32765629.1376578698499
>
> Content-Type: text/plain; charset=us-ascii
>
> Content-Transfer-Encoding: 7bit
>
>
>
> Your Doc
>
> ------=_Part_288_32765629.1376578698499
>
> Content-Type: application/pdf;
>
> name=thisisthe.pdf
>
> Content-Transfer-Encoding: base64
>
> Content-Disposition: attachment;
>
> filename=thisisthe.pdf
>
>
>
> KTYMCLi0xLjQKJaqrrK0KNCAwIG9iago8PAovQ3JlYXRvciAoQXBhY2hlIEZPUCBWZXJzaW9ujclis
>
> KCkZL1Byb2R1Y2VyIChBcGFjaGUgRk9QIFZlcnNpb24gMS4wKQovQ3JlYXRpb25EYXRlIChEOjkm
>
> QTMwOKE1MTA1ODE3LTA0JzAwJykKPj4KZW5kb2JqCjUgMCBvYmoKPDwKICAvTiAzCiAgL0xlbill0
>
> ------=_Part_288_32765629.1376578698499—
>
>
>
> There is a lot more between the “ Part_288” lines that I’ve
> left out.
>
>
>
> So my question is how could I get the “thisisthe.pdf” file to
> actually be a pdf that I could open?
>
>
>
> I tried using mutt’s –a facility with just the encoded stuff
> but no go. Using it with just the stuff after Your Doc is no
> go. Web search just gives me hit after hit about either how
> to read an attachment after it has been delivered or how to
> send an attachment in the first place and neither of those is
> my question.
>
>
>
> Again my question is how to get the EXISTING attachment out of
> the /var/spool/mqueue files.
>
>
>
>
>
>
>
>
>
>
> Athena®, Created for the Cause™
>
> Making a Difference in the Fight Against Breast Cancer
>
>
>
>
>
> How and Why I Should Support Bottled Water!
> Do not relinquish your right to choose bottled water as a
> healthy alternative to beverages that contain sugar, calories,
> etc. Your support of bottled water will make a difference!
> Your signatures count! Go to
> http://www.bottledwatermatters.org/luv-bottledwater-iframe/dswaters and sign a petition to support your right to always choose bottled water. Help fight federal and state issues, such as bottle deposits (or taxes) and organizations that want to ban the sale of bottled water. Support community curbside recycling programs. Support bottled water as a healthy way to maintain proper hydration. Our goal is 50,000 signatures. Share this petition with your friends and family today!
>
>
>
> ---------------------------------
> CONFIDENTIALITY NOTICE: This e-mail may contain privileged or
> confidential information and is for the sole use of the
> intended recipient(s). If you are not the intended recipient,
> any disclosure, copying, distribution, or use of the contents
> of this information is prohibited and may be unlawful. If you
> have received this electronic transmission in error, please
> reply immediately to the sender that you have received the
> message in error, and delete it. Thank you.
> ----------------------------------
>
>
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
--
Michael H. Warfield (AI4NB) | (770) 985-6132 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
NIC whois: MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://mail.ale.org/pipermail/ale/attachments/20130816/55d01f15/attachment.sig>
More information about the Ale
mailing list