免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2233 | 回复: 3
打印 上一主题 下一主题

[Mail] MailScanner加密附件问题? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-09-09 13:20 |只看该作者 |倒序浏览
MailScanner可以检测附件的内容以及类型,请问它能不能给附件加密啊,比如我发现附件是doc类型的就使用:
  1. zip -P 123456 aaa.zip aaa.doc
复制代码
给附件加密,替换aaa.doc为aaa.zip。

论坛徽章:
8
综合交流区版块每周发帖之星
日期:2015-12-02 15:03:53数据库技术版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-10-02 06:20:00IT运维版块每日发帖之星
日期:2015-09-14 06:20:00金牛座
日期:2014-10-10 11:23:34CU十二周年纪念徽章
日期:2013-10-24 15:41:34酉鸡
日期:2013-10-19 10:17:1315-16赛季CBA联赛之北京
日期:2017-03-06 15:12:44
2 [报告]
发表于 2010-09-10 12:44 |只看该作者
好像不能加密

论坛徽章:
0
3 [报告]
发表于 2010-09-10 14:24 |只看该作者
恩。。。我找到了可以打zip包,但是不能加密!

论坛徽章:
0
4 [报告]
发表于 2010-09-10 14:27 |只看该作者
我看了它的code,在meesage.pm中(俺是搞C开发的,perl一点儿都不懂)
  1. # Create a new zip archive
  2.   my $zip = Archive::Zip->new();
  3.   foreach $file (@files) {
  4.     #JKF 20080331 $zip->addFile("$explodeinto/$file", $file);
  5.     $unsafefile = $this->{safefile2file}{$file};
  6.     #print STDERR "Adding $file as $unsafefile\n";
  7.     MailScanner::Log::InfoLog("Adding zip member name \"%s\"", $file);
  8.     $zip->addFile("$explodeinto/$file", $unsafefile);
  9.   }
  10.   # The new zip file is a normal attachment.
  11.   my $safezipname = $this->MakeNameSafe('n'.$newzipname, $explodeinto);
  12.   #print STDERR "Writing to zip $safezipname\n";
  13.   my $result = $zip->writeToFileNamed($explodeinto . '/' . $safezipname);
  14.   unless($result == AZ_OK) {
  15.     #print STDERR "Error: Zip file could not be created!\n";
  16.     MailScanner::Log::WarnLog("Zip file %s for message %s could not be created",
  17.                               $safezipname, $this->{id});
  18.     return;
  19.   }
复制代码
看似比较简单改成密码保护的,但是它使用的是Archive的zip库,这套库不支持密码保护功能,google了半天也没有结果,在perl版块问也木有人回答。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP