[ale] Extracting from EXISTING /var/spool/mqueue file

Lightner, Jeff JLightner at water.com
Fri Aug 16 09:00:53 EDT 2013


Thanks Brian.

It worked.

Initially I was getting “invalid input” on doing what you wrote.   After review of the man page for base64 I added the “-i” option before the “-d” and it worked like champ.

From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Brian Mathis
Sent: Thursday, August 15, 2013 11:34 PM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Extracting from EXISTING /var/spool/mqueue file

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


❧ Brian Mathis

On Thu, Aug 15, 2013 at 5:03 PM, Lightner, Jeff <JLightner at water.com<mailto: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<mailto:Ale at ale.org>
http://mail.ale.org/mailman/listinfo/ale
See JOBS, ANNOUNCE and SCHOOLS lists at
http://mail.ale.org/mailman/listinfo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130816/42402b84/attachment-0001.html>


More information about the Ale mailing list