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

Lightner, Jeff JLightner at water.com
Thu Aug 15 18:03:44 EDT 2013


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.
----------------------------------


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


More information about the Ale mailing list