FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Red Hat Linux

 
 
LinkBack Thread Tools
 
Old 03-04-2010, 02:12 AM
Kenneth Kirchner
 
Default Extracting a MIME/Base64 attachment from /var/spool/mail

Hello all,

I am trying to automate a way to extract a PDF that gets e-mailed to me daily. I want to run a script on this PDF, but I cant until I detach it and decode it.

Unfortunately, I have a limitation that prevents me from using any software that is not part of RHELv5. I cant even install CPAN modules, only modules that Redhat releases as part of v5.4. I can use custom Perl/Python scripts.

I have successfully taken my /var/spool/user file, chopped off the header/trailer info and decoded the remaining data using 'base64 -d foo' so I know it's not too much harder. I am just at a loss for a better way to do this within my limited environment. I do run sendmail on this box, but I am not sure if it can dump attachments without some additional piece of software. I saw a very nice bit of Perl code in my Googling before asking here, but it required a Perl MIME module that Redhat does not distribute with RHEL.

So, any ideas? I've seen stuff like 'mpack/munpack' in my Google searches, but I can't seem to find anything like it that comes in 'Official Redhat' RPM. I unfortunately cannot budge on that requirement.

-Ken

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 
Old 03-05-2010, 10:36 PM
Kenneth Kirchner
 
Default Extracting a MIME/Base64 attachment from /var/spool/mail

On Mar 3, 2010, at 8:12 PM, Kenneth Kirchner wrote:

> Hello all,
>
> I am trying to automate a way to extract a PDF that gets e-mailed to me daily. I want to run a script on this PDF, but I cant until I detach it and decode it.
>
> Unfortunately, I have a limitation that prevents me from using any software that is not part of RHELv5. I cant even install CPAN modules, only modules that Redhat releases as part of v5.4. I can use custom Perl/Python scripts.
>
> I have successfully taken my /var/spool/user file, chopped off the header/trailer info and decoded the remaining data using 'base64 -d foo' so I know it's not too much harder. I am just at a loss for a better way to do this within my limited environment. I do run sendmail on this box, but I am not sure if it can dump attachments without some additional piece of software. I saw a very nice bit of Perl code in my Googling before asking here, but it required a Perl MIME module that Redhat does not distribute with RHEL.
>
> So, any ideas? I've seen stuff like 'mpack/munpack' in my Google searches, but I can't seem to find anything like it that comes in 'Official Redhat' RPM. I unfortunately cannot budge on that requirement.

I said to heck with the restrictions and installed the required CPAN modules. Everything is working perfectly.

-Ken

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
 

Thread Tools




All times are GMT. The time now is 07:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org