看起来mpack并不随RHEL一起提供。 是否有RHEL 5附带的命令行MIME提取器(即可以从shell脚本使用的东西),不需要从源代码安装第三方软件包或构build?
TM的力量不会热衷于使用任何不是由供应商包装的东西,所以如果可能的话,我宁愿使用RHEL 5的东西。
perl-MIME-tools软件包包含多种用于处理MIME编码消息的命令行工具,包括mimeexplode :
Takes one or more files from the command line that contain MIME messages, and explodes their contents out into subdirectories of the current working directory. The subdirectories are just called "msg0", "msg1", "msg2", etc. Existing directories are skipped over.
ripmime命令打包在EPEL中 ,如果符合“由供应商打包”的要求。
通过MIME你的意思是Base64? OpenSSL可以用来解码Base64,
openssl enc -d -base64 -in file.in -out file.out
编辑:
由于情况并非如此,Python(它是默认的RHEL安装的一部分)包括可用于使用和解释电子邮件的email模块,包括处理附件。 文档位于: http : //docs.python.org/library/email.parser.html
显然有一些编程需要,有一个SO问题覆盖它: https : //stackoverflow.com/questions/8307809/save-email-attachment-python3-pop3-ssl-gmail