Extracting a MIME/Base64 attachment from /var/spool/mail

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux