作者 邓超

1

@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 2
3 namespace App\Console\Commands; 3 namespace App\Console\Commands;
4 4
  5 +use Helper\Mail\Mail;
5 use Illuminate\Console\Command; 6 use Illuminate\Console\Command;
6 use function Co\run; 7 use function Co\run;
7 8
@@ -29,20 +30,36 @@ class Demo extends Command @@ -29,20 +30,36 @@ class Demo extends Command
29 public function handle() 30 public function handle()
30 { 31 {
31 32
32 - $i = 0;  
33 - $n = 'a';  
34 - run(function () use (&$i,&$n){ 33 + run(function (){
  34 + go(function (){
  35 +
  36 + $redis = swoole_redis();
  37 +// $a = $redis->eval(...swoole_redis_add('asdad:1',1,600));
  38 +// var_dump($a);
  39 + $redis->rPush('syncMailBody',300);
  40 +// $redis->rPush('syncMailBody',301);
  41 +// $redis->rPush('syncMailBody',302);
  42 +// $redis->rPush('syncMailBody',303);
  43 +// $redis->rPush('syncMailBody',304);
  44 +// $redis->rPush('syncMailBody',305);
  45 +// $redis->rPush('syncMailBody',306);
  46 +// $redis->rPush('syncMailBody',307);
  47 +// $redis->rPush('syncMailBody',308);
  48 +// $redis->rPush('syncMailBody',309);
  49 +
  50 + $redis->set('syncmailbodystop',1);
35 51
36 - go(function () use (&$i,&$n){  
37 - $n = 'b';  
38 - $i = 2;  
39 }); 52 });
40 53
41 }); 54 });
42 55
43 - echo $i;  
44 - echo $n; 56 +
  57 +
  58 +
45 59
46 return Command::SUCCESS; 60 return Command::SUCCESS;
47 } 61 }
  62 +
  63 +
  64 +
48 } 65 }
1 -<?php  
2 -//  
3 -//namespace App\Console\Commands;  
4 -//  
5 -//use App\Models\Email;  
6 -//use App\Models\Folder;  
7 -//use Helper\Mail\Mail;  
8 -//use Illuminate\Console\Command;  
9 -//use Illuminate\Support\Facades\Cache;  
10 -//use Illuminate\Support\Facades\Log;  
11 -//use function Co\run;  
12 -//  
13 -//class PushSync extends Command  
14 -//{  
15 -// /**  
16 -// * The name and signature of the console command.  
17 -// *  
18 -// * @var string  
19 -// */  
20 -// protected $signature = 'PushSync';  
21 -//  
22 -// /**  
23 -// * The console command description.  
24 -// *  
25 -// * @var string  
26 -// */  
27 -// protected $description = '发布同步任务到队列中';  
28 -//  
29 -// /**  
30 -// * Execute the console command.  
31 -// *  
32 -// * @return int  
33 -// */  
34 -// public function handle()  
35 -// {  
36 -// // 最大协程 1000  
37 -// \co::set(['max_coroutine'=>1000]);  
38 -// // 开启协程池  
39 -// run(function (){  
40 -// // 统计邮箱总数量  
41 -// $size = Email::select(['id'])->count();  
42 -// if($size){  
43 -// // 开启协程的数量  
44 -// $i = ceil($size/100);  
45 -// while ($i >= 0){  
46 -// // 开启一个协程  
47 -// go(function () use (&$i){  
48 -// // 取得邮箱列表  
49 -// $emails = Email::getPushEmailList($i);  
50 -// if($emails){  
51 -// foreach ($emails as $email) {  
52 -//  
53 -// }  
54 -// }  
55 -// });  
56 -//  
57 -// $i--;  
58 -// }  
59 -// }  
60 -//  
61 -// });  
62 -//  
63 -// return Command::SUCCESS;  
64 -// }  
65 -//  
66 -// /**  
67 -// * 开始同步执行  
68 -// * @param int $id 邮箱id  
69 -// * @author:dc  
70 -// * @time 2023/2/5 17:21  
71 -// */  
72 -// private function push(int $id = 0){  
73 -//  
74 -// $email = Email::where(['status'=>1,'pwd_error'=>0])  
75 -// ->where('id','>',$id)  
76 -// ->orderBy('id','asc')  
77 -// ->select()  
78 -// ->first();  
79 -//  
80 -// if($email){  
81 -// // 登录imap服务器  
82 -// Mail::login($email->email,$email->password,$email->imap);  
83 -// // 设置id  
84 -// Mail::$client[$email]->setId($email->id);  
85 -// // 同步文件夹  
86 -// Mail::syncFolder($email->email);  
87 -//  
88 -// // 获取当前邮箱的所有文件夹  
89 -// $folders = Folder::_all($email->id);  
90 -// // 目前只发现最高2级  
91 -// foreach ($folders as $folder){  
92 -// if(empty($folder['_child'])){  
93 -// // 同步邮件  
94 -// Mail::syncMail($email->email,$folder['origin_folder']);  
95 -// }else{  
96 -// // 循环子级目录,有子级的情况,父级不可操作,且不会有邮件  
97 -// foreach ($folder['_child'] as $f){  
98 -// // 同步邮件  
99 -// Mail::syncMail($email->email,$folder['origin_folder'].'/'.$f['origin_folder']);  
100 -// }  
101 -// }  
102 -//  
103 -// }  
104 -//  
105 -// // 再次执行  
106 -// $this->push($email->id);  
107 -//  
108 -// }  
109 -//  
110 -// }  
111 -//  
112 -//  
113 -//  
114 -//}  
  1 +<?php
  2 +
  3 +namespace App\Console\Commands;
  4 +
  5 +use App\Models\EList;
  6 +use App\Models\Email;
  7 +use App\Models\Folder;
  8 +use Helper\Mail\Mail;
  9 +use Illuminate\Console\Command;
  10 +use Illuminate\Support\Facades\Cache;
  11 +use Illuminate\Support\Facades\Log;
  12 +use Swoole\Coroutine\Redis;
  13 +use function Co\run;
  14 +
  15 +class SyncBody extends Command
  16 +{
  17 + /**
  18 + * The name and signature of the console command.
  19 + *
  20 + * @var string
  21 + */
  22 + protected $signature = 'SyncBody';
  23 +
  24 + /**
  25 + * The console command description.
  26 + *
  27 + * @var string
  28 + */
  29 + protected $description = '同步邮箱中邮件的内容';
  30 +
  31 + /**
  32 + * Execute the console command.
  33 + *
  34 + * @return int
  35 + */
  36 + public function handle()
  37 + {
  38 +
  39 + // 携程数量越大,需要的内存越大
  40 + $max_coroutine = 1000;
  41 + // 最大携程数量
  42 + \co::set(['max_coroutine'=>$max_coroutine]);
  43 +
  44 + run(function (){
  45 + // 删除key
  46 + swoole_redis()->delete('syncmailbodystop');
  47 +
  48 + // 先开100个携程
  49 + for ($i = 100; $i > 0; $i--) {
  50 + // 创建携程
  51 + go(function () {
  52 + // 需要获取邮件的id
  53 + $isRun = true;
  54 + while ($isRun){
  55 + // @var $redis 这个必须放携程里面
  56 + $redis = swoole_redis();
  57 + // 获取到邮件的数据id
  58 + $id = $redis->lPop('syncMailBody');
  59 +
  60 + if($id){
  61 + $this->sync($redis,$id);
  62 + }else {
  63 + // 暂停1秒
  64 + \co::sleep(1);
  65 + }
  66 +
  67 +
  68 + // 是否暂停同步
  69 + if($redis->get('syncmailbodystop') == 1){
  70 + $isRun = false;
  71 + }
  72 + // 关闭redis
  73 + $redis->close();
  74 + $redis = null;
  75 + }
  76 +
  77 +
  78 + });
  79 + }
  80 +
  81 +
  82 + });
  83 +
  84 + return Command::SUCCESS;
  85 + }
  86 +
  87 +
  88 + /**
  89 + * 执行
  90 + * @param $redis Redis
  91 + * @param $id
  92 + * @author:dc
  93 + * @time 2023/2/8 11:44
  94 + */
  95 + public function sync(&$redis,$id){
  96 + try {
  97 + // 先暂用,锁上这个id
  98 + if($redis->eval(...swoole_redis_add('syncmailbodyrun:'.$id,$id,3))){
  99 + $this->echoStr('number:'.$id);
  100 + // 读取邮件信息
  101 + $mail = EList::where('id',$id)->first();
  102 + if(!$mail){
  103 + return false;
  104 + }
  105 +
  106 + $email_id = $mail->email_id;
  107 + $folder_id = $mail->folder_id;
  108 +
  109 + /*** 获取邮箱信息 ***/
  110 + $email_key = 'email_list:'.$email_id;
  111 + // 判断是否有携程在查询了
  112 + if($redis->eval(...swoole_redis_add($email_key,1,600))){
  113 + // 查询邮箱
  114 + $emailModel = Email::where('id',$email_id)->first();
  115 + if($emailModel){
  116 + // 设置缓存
  117 + $redis->set($email_key,$emailModel->toArray(),600);
  118 + }else {
  119 + // 删除缓存
  120 + $redis->delete($email_key);
  121 + }
  122 + }else {
  123 + // 等待读取缓存
  124 + $is_while = 1;
  125 + while (true){
  126 + $emailModel = $redis->get($email_key);
  127 + // 等待中没有邮箱信息,跳过
  128 + if(!$emailModel || is_array($emailModel) || $is_while>100){
  129 + break;
  130 + }
  131 + $is_while++;
  132 + // 暂停0.5秒
  133 + \co::sleep(0.5);
  134 + }
  135 + }
  136 +
  137 + /*** end 获取邮箱信息 ***/
  138 + if($emailModel){
  139 + $this->echoStr('找到:'.$emailModel['email']);
  140 + $email = $emailModel['email'];
  141 + $password = $emailModel['password'];
  142 + $imap = $emailModel['imap'];
  143 +
  144 + /** 获取文件夹等情况 **/
  145 + $folder_key = 'email_folder:'.$folder_id;
  146 + if($redis->eval(...swoole_redis_add($folder_key,1,600))){
  147 + // 查询邮箱
  148 + $folder_name = Folder::getOriginName($folder_id);
  149 + if($folder_name){
  150 + // 设置缓存
  151 + $redis->set($folder_key,$folder_name,600);
  152 + }else {
  153 + // 删除缓存
  154 + $redis->delete($folder_key);
  155 + }
  156 + }else {
  157 + // 等待读取缓存
  158 + $is_while = 1; // 防止死循环
  159 + while ($is_while){
  160 + $folder_name = $redis->get($folder_key);
  161 + // 等待中没有邮箱信息,跳过
  162 + if(!$folder_name || $folder_name!=1 || $is_while>=100){
  163 + break;
  164 + }
  165 + $is_while++;
  166 + // 暂停0.5秒
  167 + \co::sleep(0.5);
  168 + }
  169 + }
  170 + $this->echoStr('目录:'.$folder_name);
  171 + if($folder_name){
  172 + Mail::syncBody(
  173 + $id,
  174 + $mail->msgno,
  175 + $email_id,
  176 + $folder_name,
  177 + $email,
  178 + $password,
  179 + $imap
  180 + );
  181 + }
  182 + }
  183 +
  184 + }
  185 +
  186 + }catch (\Throwable $e){
  187 + echo "协程(".\co::getCid()."): ".$e->getMessage().PHP_EOL.$e->getTraceAsString();
  188 + Log::error($e->getMessage().$e->getTraceAsString());
  189 + // 再次发布
  190 + $redis->rPush('syncMailBody',$id);
  191 + }
  192 +
  193 + return true;
  194 + }
  195 +
  196 + public function echoStr(string $str){
  197 + echo '协程('.\co::getCid().'): '.$str.PHP_EOL;
  198 + }
  199 +
  200 +
  201 +}
@@ -8,6 +8,7 @@ use Helper\Mail\Mail; @@ -8,6 +8,7 @@ use Helper\Mail\Mail;
8 use Illuminate\Console\Command; 8 use Illuminate\Console\Command;
9 use Illuminate\Support\Facades\Cache; 9 use Illuminate\Support\Facades\Cache;
10 use Illuminate\Support\Facades\Log; 10 use Illuminate\Support\Facades\Log;
  11 +use Swoole\Coroutine\Redis;
11 use function Co\run; 12 use function Co\run;
12 13
13 class SyncMailList extends Command 14 class SyncMailList extends Command
@@ -38,10 +39,20 @@ class SyncMailList extends Command @@ -38,10 +39,20 @@ class SyncMailList extends Command
38 $rand = date('dHi'); 39 $rand = date('dHi');
39 // 携程数量越大,需要的内存越大 40 // 携程数量越大,需要的内存越大
40 $max_coroutine = 10000; 41 $max_coroutine = 10000;
41 - // 最大携程数量  
42 - \co::set(['max_coroutine'=>$max_coroutine]);  
43 -  
44 - run(function () use ($rand,$max_coroutine){ 42 + // swoole全局设置,需要在swoole运行前设置
  43 + \co::set([
  44 + 'max_coroutine'=>$max_coroutine, // 最大携程数量
  45 + 'hook_flags'=>SWOOLE_HOOK_TCP, // redis需要的配置
  46 + ]);
  47 +
  48 + // redis 配置
  49 + $redis_config = [
  50 + 'host' => env('REDIS_HOST','127.0.0.1'),
  51 + 'port' => env('REDIS_PORT',6379),
  52 + 'password' => env('REDIS_PASSWORD',null)
  53 + ];
  54 +
  55 + run(function () use ($rand,$max_coroutine,$redis_config){
45 // 获取邮箱总数量 56 // 获取邮箱总数量
46 $size = Email::where([])->count(); 57 $size = Email::where([])->count();
47 // 最后一条数据的id 58 // 最后一条数据的id
@@ -51,14 +62,23 @@ class SyncMailList extends Command @@ -51,14 +62,23 @@ class SyncMailList extends Command
51 if ($max_coroutine){ 62 if ($max_coroutine){
52 for ($i = $max_coroutine; $i > 0; $i--) { 63 for ($i = $max_coroutine; $i > 0; $i--) {
53 // 创建携程 64 // 创建携程
54 - go(function () use ($size,$rand,$lastId){ 65 + go(function () use ($size,$rand,$lastId,$redis_config){
  66 +
  67 + // redis 携程中无法使用laravel的cache的redis驱动
  68 + $redis = swoole_redis();
55 69
56 $n = 1; 70 $n = 1;
57 while ($n <= $lastId){ 71 while ($n <= $lastId){
  72 + echo 'syncMail'.$rand.':'.$n;echo PHP_EOL;
  73 + // 使用lua脚本
  74 + $add = $redis->eval(
  75 + ...swoole_redis_add('syncMail'.$rand.':'.$n,$n,7200)
  76 + );
58 // 是否已存在 77 // 是否已存在
59 - if(Cache::add('syncMail'.$rand.':'.$n,$n,7200)) { 78 + if($add) {
60 $this->sync($n); 79 $this->sync($n);
61 } 80 }
  81 +
62 $n++; 82 $n++;
63 } 83 }
64 84
@@ -79,13 +99,14 @@ class SyncMailList extends Command @@ -79,13 +99,14 @@ class SyncMailList extends Command
79 */ 99 */
80 private function sync(int $n = 0){ 100 private function sync(int $n = 0){
81 101
  102 + /** @var $email Email */
82 $email = Email::where(['id'=>$n])->first(); 103 $email = Email::where(['id'=>$n])->first();
83 // 密码没有错误,且状态正常的 104 // 密码没有错误,且状态正常的
84 if ($email && $email->pwd_error == 0 && $email->status == Email::STATUS_ACTIVE){ 105 if ($email && $email->pwd_error == 0 && $email->status == Email::STATUS_ACTIVE){
85 // 登录imap服务器 106 // 登录imap服务器
86 Mail::login($email->email,$email->password,$email->imap); 107 Mail::login($email->email,$email->password,$email->imap);
87 // 设置id 108 // 设置id
88 - Mail::$client[$email]->setId($email->id); 109 + Mail::$client[$email->email]->setId($email->id);
89 // 同步文件夹 110 // 同步文件夹
90 Mail::syncFolder($email->email); 111 Mail::syncFolder($email->email);
91 112
@@ -95,12 +116,12 @@ class SyncMailList extends Command @@ -95,12 +116,12 @@ class SyncMailList extends Command
95 foreach ($folders as $folder){ 116 foreach ($folders as $folder){
96 if(empty($folder['_child'])){ 117 if(empty($folder['_child'])){
97 // 同步邮件 118 // 同步邮件
98 - Mail::syncMail([],$email->email,$email->id,$folder['id'],$folder['origin_folder']); 119 + Mail::syncMail($email->email,$email->id,$folder['id'],$folder['origin_folder']);
99 }else{ 120 }else{
100 // 循环子级目录,有子级的情况,父级不可操作,且不会有邮件 121 // 循环子级目录,有子级的情况,父级不可操作,且不会有邮件
101 foreach ($folder['_child'] as $f){ 122 foreach ($folder['_child'] as $f){
102 // 同步邮件 123 // 同步邮件
103 - Mail::syncMail([],$email->email,$email->id,$f['id'],$folder['origin_folder'].'/'.$f['origin_folder']); 124 + Mail::syncMail($email->email,$email->id,$f['id'],$folder['origin_folder'].'/'.$f['origin_folder']);
104 } 125 }
105 } 126 }
106 127
@@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Model; @@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Model;
10 * Class EmailList 10 * Class EmailList
11 * @package App\Mail\Models 11 * @package App\Mail\Models
12 */ 12 */
13 -class EmailBody extends Model{ 13 +class Body extends Model{
14 14
15 const UPDATED_AT = null; 15 const UPDATED_AT = null;
16 16
@@ -15,6 +15,16 @@ use Illuminate\Pagination\Paginator; @@ -15,6 +15,16 @@ use Illuminate\Pagination\Paginator;
15 */ 15 */
16 class EList extends Model{ 16 class EList extends Model{
17 17
  18 + /**
  19 + * 表名
  20 + * @var string
  21 + */
  22 + protected $table = 'lists';
  23 +
  24 + /**
  25 + * 追加自动完成
  26 + * @var string[]
  27 + */
18 protected $appends = ['to_time']; 28 protected $appends = ['to_time'];
19 29
20 // 收到的时间 30 // 收到的时间
@@ -55,6 +65,11 @@ class EList extends Model{ @@ -55,6 +65,11 @@ class EList extends Model{
55 65
56 if($id){ 66 if($id){
57 $ids[] = $id; 67 $ids[] = $id;
  68 +
  69 + // 插入列表,方便脚本读取邮件内容
  70 + $redis = swoole_redis();
  71 + $redis->rPush('syncMailBody',$id);
  72 +
58 } 73 }
59 }catch (\Throwable $e){ 74 }catch (\Throwable $e){
60 EmailLog::error([$data,$e->getMessage(),$e->getTraceAsString()]); 75 EmailLog::error([$data,$e->getMessage(),$e->getTraceAsString()]);
@@ -193,7 +208,7 @@ class EList extends Model{ @@ -193,7 +208,7 @@ class EList extends Model{
193 * @time 2022/8/2 14:25 208 * @time 2022/8/2 14:25
194 */ 209 */
195 public function body(){ 210 public function body(){
196 - return $this->hasOne(EmailBody::class,'email_lists_id','id'); 211 + return $this->hasOne(Body::class,'email_lists_id','id');
197 } 212 }
198 213
199 214
@@ -226,4 +226,28 @@ class Folder extends Model { @@ -226,4 +226,28 @@ class Folder extends Model {
226 } 226 }
227 227
228 228
  229 + /**
  230 + * 读取源名称
  231 + * @param $id
  232 + * @return string
  233 + * @author:dc
  234 + * @time 2023/2/7 17:29
  235 + */
  236 + public static function getOriginName($id){
  237 + $folder = static::where('id',$id)->select(['id','pid','origin_folder'])->first();
  238 + $folder_name = '';
  239 + if ($folder){
  240 + $folder_name = $folder->origin_folder;
  241 + if($folder->pid){
  242 + $pfolder = static::where('id',$folder->pid)->select(['id','pid','origin_folder'])->first();
  243 + if($pfolder){
  244 + $folder_name .= '/'.$pfolder->origin_folder;
  245 + }
  246 + }
  247 + }
  248 +
  249 + return $folder_name;
  250 + }
  251 +
  252 +
229 } 253 }
@@ -9,7 +9,8 @@ @@ -9,7 +9,8 @@
9 "guzzlehttp/guzzle": "^7.2", 9 "guzzlehttp/guzzle": "^7.2",
10 "laravel/framework": "^9.19", 10 "laravel/framework": "^9.19",
11 "laravel/sanctum": "^3.0", 11 "laravel/sanctum": "^3.0",
12 - "laravel/tinker": "^2.7" 12 + "laravel/tinker": "^2.7",
  13 + "phpmailer/phpmailer": "^6.7"
13 }, 14 },
14 "require-dev": { 15 "require-dev": {
15 "fakerphp/faker": "^1.9.1", 16 "fakerphp/faker": "^1.9.1",
  1 +<?php
  2 +
  3 +namespace Helper\Mail;
  4 +
  5 +use Helper\Mail\MailFun;
  6 +
  7 +/**
  8 + * 解析邮件body内容
  9 + * 通过 fetch msgno RFC822.text 获取到的内容
  10 + * 此内容包含html 文本 附件
  11 + * @author:dc
  12 + * @time 2022/8/12 9:15
  13 + * Class Body
  14 + * @package App\Mail\lib
  15 + */
  16 +class Body {
  17 +
  18 + /**
  19 + * @var string
  20 + */
  21 + private $body;
  22 +
  23 + /**
  24 + *
  25 + * @var array
  26 + */
  27 + private $item = [];
  28 +
  29 + /**
  30 + * 保存的目录
  31 + * @var string
  32 + */
  33 + private $fileSavePath;
  34 +
  35 +
  36 + /**
  37 + * Body constructor.
  38 + * @param string $body
  39 + * @param string $fileSavePath
  40 + */
  41 + public function __construct(string $body, string $fileSavePath='/')
  42 + {
  43 + $this->body = $body = trim($body);
  44 +
  45 + $this->fileSavePath = $fileSavePath;
  46 +
  47 + // 这个是描述特殊文本
  48 + if(strpos($body,'This is a multi-part message in MIME format.')===0){
  49 + $body = trim($body,'This is a multi-part message in MIME format.');
  50 + $body = trim($body);
  51 + }
  52 +
  53 + // 163 有
  54 + if(strpos($body,'------=_Part')!==false){
  55 + $this->parse($body,'------=_Part');
  56 + }
  57 + elseif (mb_strpos($body,'------=_NextPart')!==false){
  58 + $this->parse($body,'------=_NextPart');
  59 + }
  60 + elseif (mb_strpos($body,'----_NmP')!==false){
  61 + $this->parse($body,'----_NmP');
  62 + }
  63 + elseif (mb_strpos($body,'--_=_swift')!==false){
  64 + $this->parse($body,'--_=_swift');
  65 + }
  66 + elseif (mb_strpos($body,'----==_mimepart')!==false){
  67 + $this->parse($body,'----==_mimepart');
  68 + }
  69 + elseif (mb_strpos($body,'--------------Boundary')!==false){
  70 + $this->parse($body,'--------------Boundary');
  71 + }
  72 + elseif (mb_strpos($body,'--=-')!==false){
  73 + $this->parse($body,'--=-');
  74 + }
  75 + // 很多--开始的,且不规则
  76 + elseif(strpos($body,'--')===0){
  77 + // 获取第一行
  78 + $tag = $this->body_get_tag($body,'--');
  79 + // 以第一行为标准
  80 + $this->parse($body,trim($tag));
  81 + }
  82 + // 直接html
  83 + elseif (mb_strpos($body,'<')===0){
  84 + $body = quoted_printable_decode($body);
  85 +// preg_match("/<meta(?!\s*(?:name|value)\s*=)(?:[^>]*?content\s*=[\s\"']*)?([^>]*?)[\s\"';]*charset\s*=[\s\"']*([^\s\"'\/>]*)/",$body,$icon);
  86 +// if(!empty($icon[2])){
  87 +// // 解码
  88 +// $body = mb_convert_encoding($body,'utf-8',$icon[2]);
  89 +// }
  90 + $this->setItem(['type'=>'text/html','body'=>$body]);
  91 + }
  92 + else{
  93 + // qq的是base64
  94 + if(rtrim($body,'=') == rtrim(base64_encode(base64_decode($body)),'=')){
  95 + $this->setItem(['type'=>'text/plain','body'=>base64_decode($body)]);
  96 + }else{
  97 + $this->setItem(['type'=>'text/plain','body'=>$body]);
  98 + }
  99 +
  100 + }
  101 +
  102 +
  103 + }
  104 +
  105 + /**
  106 + * 获取标签
  107 + * @param $body
  108 + * @param $tag
  109 + * @return mixed|string
  110 + * @author:dc
  111 + * @time 2022/8/12 10:49
  112 + */
  113 + private function body_get_tag($body,$tag){
  114 + preg_match("/{$tag}[\w\W].*/i",$body,$result);
  115 + if(!empty($result[0])) {
  116 + return $result[0];
  117 + }
  118 + return '';
  119 + }
  120 +
  121 + /**
  122 + * @param $item
  123 + */
  124 + private function setItem($item): void
  125 + {
  126 + $this->item[] = $item;
  127 + }
  128 +
  129 +
  130 + /**
  131 + * @return []
  132 + */
  133 + public function getItem(): array
  134 + {
  135 + return $this->item;
  136 + }
  137 +
  138 +
  139 + /**
  140 + * 开始解析
  141 + * @param string $body
  142 + * @param string $tag
  143 + * @return array
  144 + * @author:dc
  145 + * @time 2022/8/12 9:50
  146 + */
  147 + private function parse(string $body, string $tag){
  148 +
  149 + // 删除第一个标签前面的数据,一般情况无用
  150 + $body = mb_substr($this->body,strpos($this->body,$tag),99999999999);
  151 +
  152 + // 有附件的情况
  153 + preg_match('/boundary="([-_A-Za-z0-9=\.]{1,})"/i',$body,$boundary);
  154 + if($boundary[0]??''){
  155 + $body = str_replace($boundary[0],'',$body);
  156 +// $body = mb_substr($body,mb_strpos($body,$boundary[0])+strlen($boundary[0]),99999999999);
  157 + }
  158 + // 附件情况
  159 + if(!empty($boundary[1])){
  160 + preg_match_all('/.*'.$boundary[1].'.*/i',$body,$boundary_tag);
  161 + $body = str_replace($boundary_tag[0],'{--tag--}',$body);
  162 + }
  163 + // 查找tag块
  164 + preg_match_all("/(".$tag.".*+\n)/i",$body."\r\n\r\n",$he);
  165 + // 把每个tag块分开成数组
  166 + if(!empty($he[0])){
  167 + foreach ($he[0] as $hk=>$h){
  168 + $he[0][$hk] = trim($h);
  169 + }
  170 + arsort($he[0]);
  171 + $body = str_replace($he[0],'{--tag--}',$body);
  172 + }
  173 + $body = explode('{--tag--}',$body);
  174 + // 处理
  175 + foreach ($body as $key=>$item){
  176 + $data = [];
  177 +
  178 + $item = trim($item);
  179 + // 附件的头
  180 + if(!$item) { continue; }
  181 +
  182 + // 邮件体包含邮件体
  183 + if(preg_match("/boundary=\"([-_a-z0-9]{5,})\"/Ui",$item,$bm)){
  184 + if (strpos($item,$bm[1].'--')!==false){
  185 + $data = (new self('--'.$bm[1]."\r\n".$item,$this->fileSavePath))->getItem();
  186 +// $this->setItem($data);
  187 + // 合并邮件体
  188 + $this->item = array_merge($this->item,$data);
  189 + }
  190 + continue;
  191 + }
  192 +
  193 + // 先解码解码
  194 + $encode = $this->body_match_tag('Content-Transfer-Encoding:',$item);
  195 + if($encode){
  196 + $data['encode'] = strtolower($encode['text']);
  197 + $item = str_replace($encode['origin'],'',$item);
  198 + }
  199 +
  200 + // 内容类型
  201 + $type = $this->preg_match_type($item);
  202 + if($type){
  203 + $data['type'] = strtolower($type['type']);
  204 + // 编码
  205 + if(isset($type['charset'])){
  206 + $data['charset'] = strtolower($type['charset']);
  207 + }
  208 + // nama。附件
  209 + if(isset($type['name'])){
  210 + $data['name'] = $type['name'];
  211 + }
  212 + // 删除
  213 + $item = str_replace($type['origin'],'',$item);
  214 + }
  215 +
  216 + //
  217 + if(empty($data['charset'])){
  218 + // 编码
  219 + $code = $this->preg_match_charset($item);
  220 + if($code){
  221 + $data['charset'] = strtolower($code['charset']);
  222 +
  223 + $item = str_replace($code['origin'],'',$item);
  224 + }
  225 + }
  226 +
  227 + // 先匹配留存文件名称
  228 + preg_match('/filename="(\w?.*)"/',$item,$filename);
  229 + if(!empty($filename[1])){
  230 + $filename = MailFun::decodeMimeStr($filename[1]);
  231 + }
  232 +
  233 +
  234 + // 删除不需要的tag属性,如果需要进进行解析
  235 + $item = $this->body_remove_tag($item,'Content-Description:');
  236 + $item = $this->body_remove_tag($item,'Content-Disposition:');
  237 + $item = $this->body_remove_tag($item,'Mime-Version:');
  238 +
  239 + $data['body'] = trim($item);
  240 +
  241 + if(!empty($data['type'])){
  242 + // 邮件头
  243 + if($data['type'] == 'multipart/alternative'){
  244 +
  245 + }
  246 + // 是文本还是附件
  247 + else if(strpos($data['type'],'text/') === 0 ){
  248 + // body解密
  249 + switch($data['encode']??''){
  250 + case 'base64': {
  251 + $data['body'] = base64_decode($data['body']);
  252 + break;
  253 + }
  254 + case 'quoted-printable': {
  255 + $data['body'] = quoted_printable_decode($data['body']);
  256 + break;
  257 + }
  258 + case '8bit': {
  259 + try {
  260 + $data['body'] = DeCoding::de8bit($data['body']);
  261 + $data['body'] = quoted_printable_decode($data['body']);
  262 + }catch (\Throwable $e){
  263 +
  264 + }
  265 +
  266 + break;
  267 + }
  268 + }
  269 +
  270 + // 转码
  271 +// if(isset($data['charset']) && $data['charset']){
  272 +// $debody = @mb_convert_encoding($data['body'],'utf-8',$data['charset']);
  273 +// if($debody){
  274 +// $data['body'] = $debody;
  275 +// $debody = null;
  276 +// }
  277 +// }
  278 +
  279 +
  280 + }
  281 + // 系统退信//里面包含了发送邮件所有内容,这里不记录
  282 + elseif (strpos($data['type'],'message') === 0){
  283 + $data['body'] = '';// 一般不需要这些内容,如有需要就要重新解析
  284 + }
  285 + elseif (!empty($data['type']) && $data['body']){
  286 + // 解析附件
  287 + $data = $this->parseFile($data,$filename);
  288 + }
  289 + }
  290 +
  291 + $this->setItem($data);
  292 +
  293 + }
  294 +
  295 + }
  296 +
  297 +
  298 + /**
  299 + * 解析文件
  300 + * @param $item
  301 + * @return array|mixed
  302 + * @author:dc
  303 + * @time 2022/8/12 10:40
  304 + */
  305 + private function parseFile($item,$filename=''){
  306 + $data = [];
  307 + // 查找文件名
  308 +
  309 + $data['filename'] = $this->file_save_name($item['body'],'filename');
  310 + $data['name'] = $this->file_save_name($item['body'],'name');
  311 + $data['name'] = $data['name'] ? : ($item['name']??$filename);
  312 + $data['filename'] = $data['filename'] ? : $data['name'];
  313 +
  314 + // 是否有文件名
  315 + if(empty($data['filename']) || strpos($data['filename'],'.')===false){
  316 + return $item;
  317 + }
  318 +
  319 + $ext = explode('.',$data['filename']);
  320 + $ext = end($ext);
  321 +
  322 +// if(!empty($item['type'])){
  323 +// // 文件类型来判断后缀
  324 +// // // download it from http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
  325 +// if(is_readable(__DIR__.'/mime.types')){
  326 +// $f = fopen(__DIR__.'/mime.types','r');
  327 +// while(!feof($f)){
  328 +// $fext = fgets($f);
  329 +// if($fext){
  330 +// $fext = strtolower($fext);
  331 +// $item['type'] = strtolower($item['type']);
  332 +// // 找到了类型后缀
  333 +// if(strpos($fext,$item['type']) === 0){
  334 +// $ext = trim(str_replace($item['type'],'',$fext));
  335 +// break;//找到了要跳出循环
  336 +// }
  337 +// }
  338 +// }
  339 +// // 关闭文件
  340 +// fclose($f);
  341 +// }
  342 +// }
  343 +
  344 + // 找不到后缀,说明不是文件
  345 +// if(empty($ext)){
  346 + // 文件后缀
  347 +// $ext = explode('.',$data['filename']);
  348 +// $ext = count($ext) > 1 ? ($ext[count($ext)-1]??'') : '';
  349 + // 直接返回
  350 +// return $item['body'];
  351 +// }
  352 +
  353 +
  354 + // content id
  355 + preg_match("/Content-ID:[\s].*<[\w\W]{1,}>/i",$item['body'],$result);
  356 + if (!empty($result[0])){
  357 + $data['content-id'] = explode('<',$result[0]);
  358 + $data['content-id'] = $data['content-id'][1];
  359 + $data['content-id'] = trim($data['content-id']);
  360 + $data['content-id'] = trim($data['content-id'],'>');
  361 +
  362 + $item['body'] = str_replace($result[0],'',$item['body']);
  363 + }
  364 +
  365 + $item['body'] = str_replace($result,'',$item['body']);
  366 +
  367 +
  368 + $content = base64_decode(trim($item['body']));
  369 +
  370 + if($content){
  371 + // 目录
  372 + $data['path'] = $this->fileSavePath;
  373 + if(!is_dir($data['path'])){
  374 + mkdir($data['path'],0775,true);
  375 + }
  376 + $data['signName'] = md5($content).($ext ? '.'.$ext : '');
  377 + $data['path'] = $data['path'].'/'.$data['signName'];
  378 + // 保存文件
  379 + @file_put_contents($data['path'],$content);
  380 + }
  381 +
  382 +
  383 + return $data;
  384 + }
  385 +
  386 + // 获取文件名称
  387 + private function file_save_name(&$body,$tag){
  388 + preg_match('/'.$tag.'="[(\S\W.*\s.*)]{1,}"/i',$body,$result);
  389 + if($result[0]??''){
  390 + $body = str_replace($result[0],'',$body);
  391 + }
  392 + $val = trim(str_replace([$tag.'=','"',"'"],'',$result[0]??''));
  393 + if ($val && strpos($val,'=?')===0){
  394 +
  395 + $val = iconv_mime_decode($val,ICONV_MIME_DECODE_CONTINUE_ON_ERROR,'utf-8');
  396 + }
  397 +
  398 + return $val;
  399 + }
  400 +
  401 + /**
  402 + * 删除tag
  403 + * @param $body
  404 + * @param $tag
  405 + * @return mixed|string|string[]
  406 + * @author:dc
  407 + * @time 2022/8/12 10:34
  408 + */
  409 + private function body_remove_tag($body,$tag){
  410 + preg_match("/{$tag}[\w\W].*/i",$body,$result);
  411 + if(!empty($result[0])) {
  412 + $body = str_replace($result, '', $body);
  413 + }
  414 + return $body;
  415 + }
  416 +
  417 + /**
  418 + * 读取编码
  419 + * @param $item
  420 + * @return array
  421 + * @author:dc
  422 + * @time 2022/8/12 10:28
  423 + */
  424 + private static function preg_match_charset($item){
  425 + // 匹配内容 type
  426 + preg_match('/charset[ \t]{0,}=[ \t]{0,}"?[ \t0-9a-zA-Z-]{1,}"?/i',$item,$result);
  427 +
  428 + if(!empty($result[0])){
  429 + $ret['origin'] = trim($result[0]);
  430 + // charset
  431 + $ret['charset'] = trim(str_replace(['charset','=','"',"'"],'',$ret['origin']));
  432 +
  433 + return $ret;
  434 + }
  435 + return [];
  436 + }
  437 +
  438 + /**
  439 + * 解析type
  440 + * @param $item
  441 + * @return array
  442 + * @author:dc
  443 + * @time 2022/8/12 10:26
  444 + */
  445 + private function preg_match_type($item){
  446 + // 匹配内容 type
  447 + preg_match("/Content-Type:[\w\W].*/i",$item,$result);
  448 +
  449 + if(!empty($result[0])){
  450 + $ret['origin'] = trim($result[0]);
  451 + // type
  452 + $type = str_replace(['Content-Type:','"',"'"],'',$ret['origin']);
  453 + $type = explode(';',$type);
  454 + // 类型
  455 + $ret['type'] = trim($type[0]);
  456 + if(isset($type[1]) && $type[1]){
  457 + // 编码
  458 + $r = explode('=',$type[1]);
  459 + $ret[strtolower(trim($r[0]))] = trim($r[1]??'');
  460 + }
  461 + return $ret;
  462 + }
  463 + return [];
  464 + }
  465 +
  466 + /**
  467 + * 匹配tag
  468 + * @param $tag
  469 + * @param $item
  470 + * @return array
  471 + * @author:dc
  472 + * @time 2022/8/12 10:05
  473 + */
  474 + private function body_match_tag($tag,$item){
  475 + // tag Content-Transfer-Encoding:
  476 + preg_match("/".$tag."[\w\W].*/i",$item,$result);
  477 +
  478 + if(!empty($result[0])){
  479 + $ret['origin'] = trim($result[0]);
  480 + // charset
  481 + $ret['text'] = trim(str_replace([$tag,'"',"'"],'',$ret['origin']));
  482 +
  483 + return $ret;
  484 + }
  485 + return [];
  486 + }
  487 +
  488 +
  489 +}
  1 +<?php
  2 +
  3 +namespace Helper\Mail;
  4 +
  5 +/**
  6 + * 解码邮件内容
  7 + * @author:dc
  8 + * @time 2022/8/12 9:33
  9 + * Class DeCoding
  10 + * @package App\Mail\lib\MailParse
  11 + */
  12 +class DeCoding {
  13 +
  14 +
  15 + /**
  16 + * @param $sText
  17 + * @param bool $bEmulate_imap_8bit
  18 + * @return string
  19 + * @author:dc
  20 + * @time 2022/8/12 9:34
  21 + */
  22 + public static function de8bit($sText,$bEmulate_imap_8bit=true) {
  23 + // split text into lines
  24 + $aLines=explode(chr(13).chr(10),$sText);
  25 +
  26 + for ($i=0;$i<count($aLines);$i++) {
  27 + $sLine =& $aLines[$i];
  28 + if (strlen($sLine)===0) continue; // do nothing, if empty
  29 +
  30 + $sRegExp = '/[^\x09\x20\x21-\x3C\x3E-\x7E]/e';
  31 +
  32 + // imap_8bit encodes x09 everywhere, not only at lineends,
  33 + // for EBCDIC safeness encode !"#$@[\]^`{|}~,
  34 + // for complete safeness encode every character :)
  35 + if ($bEmulate_imap_8bit)
  36 + $sRegExp = '/[^\x20\x21-\x3C\x3E-\x7E]/e';
  37 +
  38 + $sReplmt = 'sprintf( "=%02X", ord ( "$0" ) ) ;';
  39 + $sLine = preg_replace( $sRegExp, $sReplmt, $sLine );
  40 +
  41 + // encode x09,x20 at lineends
  42 + {
  43 + $iLength = strlen($sLine);
  44 + $iLastChar = ord($sLine{$iLength-1});
  45 +
  46 + // !!!!!!!!
  47 + // imap_8_bit does not encode x20 at the very end of a text,
  48 + // here is, where I don't agree with imap_8_bit,
  49 + // please correct me, if I'm wrong,
  50 + // or comment next line for RFC2045 conformance, if you like
  51 + if (!($bEmulate_imap_8bit && ($i==count($aLines)-1)))
  52 +
  53 + if (($iLastChar==0x09)||($iLastChar==0x20)) {
  54 + $sLine{$iLength-1}='=';
  55 + $sLine .= ($iLastChar==0x09)?'09':'20';
  56 + }
  57 + } // imap_8bit encodes x20 before chr(13), too
  58 + // although IMHO not requested by RFC2045, why not do it safer :)
  59 + // and why not encode any x20 around chr(10) or chr(13)
  60 + if ($bEmulate_imap_8bit) {
  61 + $sLine=str_replace(' =0D','=20=0D',$sLine);
  62 + //$sLine=str_replace(' =0A','=20=0A',$sLine);
  63 + //$sLine=str_replace('=0D ','=0D=20',$sLine);
  64 + //$sLine=str_replace('=0A ','=0A=20',$sLine);
  65 + }
  66 +
  67 + // finally split into softlines no longer than 76 chars,
  68 + // for even more safeness one could encode x09,x20
  69 + // at the very first character of the line
  70 + // and after soft linebreaks, as well,
  71 + // but this wouldn't be caught by such an easy RegExp
  72 + preg_match_all( '/.{1,73}([^=]{0,2})?/', $sLine, $aMatch );
  73 + $sLine = implode( '=' . chr(13).chr(10), $aMatch[0] ); // add soft crlf's
  74 + }
  75 +
  76 + // join lines into text
  77 + return implode(chr(13).chr(10),$aLines);
  78 + }
  79 +}
@@ -3,7 +3,7 @@ declare(strict_types=1); @@ -3,7 +3,7 @@ declare(strict_types=1);
3 3
4 namespace Helper\Mail; 4 namespace Helper\Mail;
5 5
6 -use App\Http\Mail\lib\MailParse\Body; 6 +use Helper\Mail\Body;
7 7
8 8
9 /** 9 /**
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
4 namespace Helper\Mail; 4 namespace Helper\Mail;
5 5
6 use App\Models\EList; 6 use App\Models\EList;
  7 +use App\Models\Email;
7 use App\Models\Folder; 8 use App\Models\Folder;
8 use Illuminate\Support\Facades\DB; 9 use Illuminate\Support\Facades\DB;
9 use Illuminate\Support\Facades\Log; 10 use Illuminate\Support\Facades\Log;
@@ -77,7 +78,6 @@ class Mail { @@ -77,7 +78,6 @@ class Mail {
77 78
78 /** 79 /**
79 * 同步邮件 80 * 同步邮件
80 - * @param $msgno  
81 * @param $email 81 * @param $email
82 * @param $email_id 82 * @param $email_id
83 * @param $folder_id 83 * @param $folder_id
@@ -86,7 +86,7 @@ class Mail { @@ -86,7 +86,7 @@ class Mail {
86 * @author:dc 86 * @author:dc
87 * @time 2023/2/6 15:04 87 * @time 2023/2/6 15:04
88 */ 88 */
89 - public static function syncMail($msgno,$email,$email_id,$folder_id,$folder='INBOX'):bool { 89 + public static function syncMail($email,$email_id,$folder_id,$folder='INBOX'):bool {
90 // 选择文件夹 90 // 选择文件夹
91 try { 91 try {
92 $status = Mail::$client[$email]->selectFolder($folder); 92 $status = Mail::$client[$email]->selectFolder($folder);
@@ -102,31 +102,22 @@ class Mail { @@ -102,31 +102,22 @@ class Mail {
102 // 更新数量 102 // 更新数量
103 Folder::_updateNum($folder_id,$status['EXISTS'], $status['UNSEEN']??null); 103 Folder::_updateNum($folder_id,$status['EXISTS'], $status['UNSEEN']??null);
104 104
105 - // 是否结束同步  
106 - $end = false;  
107 -  
108 - if($msgno){  
109 - // 固定同步邮件号  
110 - goto SYNCEMAILLIST;  
111 - }  
112 -  
113 // 最后拉取的时间,如果是第一次 105 // 最后拉取的时间,如果是第一次
114 $lastMsgno = EList::_lastMsgno($email_id, $folder_id); 106 $lastMsgno = EList::_lastMsgno($email_id, $folder_id);
115 107
116 $nu = 20; 108 $nu = 20;
117 - if(!$msgno){  
118 - if(!$lastMsgno){  
119 - $msgno = range(1,$nu);  
120 - }else{  
121 - $msgno = range($lastMsgno,$lastMsgno+$nu);  
122 -  
123 - if($lastMsgno > $status['EXISTS']){  
124 - $msgno = range($status['EXISTS'] > $nu ? $status['EXISTS'] - $nu : 1,$status['EXISTS']);  
125 - }  
126 - // 一样就不拉新的  
127 - if($lastMsgno == $status['EXISTS']){  
128 - return true;  
129 - } 109 +
  110 + if(!$lastMsgno){
  111 + $msgno = range(1,$nu);
  112 + }else{
  113 + $msgno = range($lastMsgno,$lastMsgno+$nu);
  114 +
  115 + if($lastMsgno > $status['EXISTS']){
  116 + $msgno = range($status['EXISTS'] > $nu ? $status['EXISTS'] - $nu : 1,$status['EXISTS']);
  117 + }
  118 + // 一样就不拉新的
  119 + if($lastMsgno == $status['EXISTS']){
  120 + return true;
130 } 121 }
131 } 122 }
132 123
@@ -170,7 +161,8 @@ class Mail { @@ -170,7 +161,8 @@ class Mail {
170 'msgno' => $key, 161 'msgno' => $key,
171 'uid' => $result['UID'], 162 'uid' => $result['UID'],
172 'subject' => $header['Subject'], 163 'subject' => $header['Subject'],
173 -// 'cc' => $header['Cc']??'', 164 + 'cc' => $header['Cc']??'',
  165 + 'bcc' => $header['Bcc']??'',
174 'from' => $header['From'][0]['email']??'', 166 'from' => $header['From'][0]['email']??'',
175 'from_name' => $header['From'][0]['name']??'', 167 'from_name' => $header['From'][0]['name']??'',
176 'to' => $header['To']?implode(',',array_column($header['To'],'email')):'', 168 'to' => $header['To']?implode(',',array_column($header['To'],'email')):'',
@@ -184,9 +176,9 @@ class Mail { @@ -184,9 +176,9 @@ class Mail {
184 'draft' => in_array('draft',$result['FLAGS']), 176 'draft' => in_array('draft',$result['FLAGS']),
185 'flagged' => in_array('flagged',$result['FLAGS']), 177 'flagged' => in_array('flagged',$result['FLAGS']),
186 'answered' => in_array('answered',$result['FLAGS']), 178 'answered' => in_array('answered',$result['FLAGS']),
187 - 'folder_id' => $use_folder_id,  
188 - 'email_id' => $use_email_id,  
189 - 'uuid' => $use_email_id.$use_folder_id.$result['UID'], 179 + 'folder_id' => $folder_id,
  180 + 'email_id' => $email_id,
  181 + 'uuid' => $email_id.$folder_id.$result['UID'],
190 'is_file' => MailFun::isFile($file_header[$key]['BODYSTRUCTURE']??[]) //是否附件 182 'is_file' => MailFun::isFile($file_header[$key]['BODYSTRUCTURE']??[]) //是否附件
191 ]; 183 ];
192 }catch (\Throwable $e){ 184 }catch (\Throwable $e){
@@ -197,22 +189,51 @@ class Mail { @@ -197,22 +189,51 @@ class Mail {
197 189
198 $results[$key] = $data; 190 $results[$key] = $data;
199 } 191 }
200 - $ids = EmailList::_insertAll(array_values($results)); 192 + EList::_insertAll(array_values($results));
201 // 提交 193 // 提交
202 DB::commit(); 194 DB::commit();
203 - }else{  
204 - $end = true;  
205 } 195 }
206 196
207 197
  198 + // 再次调用
  199 + Mail::syncMail($email,$email_id,$folder_id,$folder);
208 200
  201 + return true;
  202 +
  203 +
  204 + }
209 205
210 - return [  
211 - 'ids' => $ids??[],  
212 - 'folder' => $status,  
213 - 'end' => $end,  
214 - ];  
215 206
  207 + /**
  208 + * 同步 邮件 内容 body
  209 + * @param $id
  210 + * @param $msgno
  211 + * @param $email_id
  212 + * @param $folder_name
  213 + * @param $email
  214 + * @param $password
  215 + * @param $imap
  216 + * @return bool
  217 + * @throws \Exception
  218 + * @author:dc
  219 + * @time 2023/2/8 13:45
  220 + */
  221 + public static function syncBody($id,$msgno, $email_id,$folder_name,$email, $password,$imap):bool {
  222 +
  223 + // 登录imap服务器
  224 + Mail::login($email,$password,$imap);
  225 + // 设置id
  226 + Mail::$client[$email]->setId($email_id);
  227 + // 选择文件夹
  228 + Mail::$client[$email]->selectFolder($folder_name);
  229 +
  230 + $body = Mail::$client[$email]->fetchBody([$msgno],storage_path('email/'.$email_id));
  231 +
  232 + if(!empty($body[$msgno]['RFC822.TEXT'])){
  233 + \App\Models\Body::_insert($id,$body[$msgno]['RFC822.TEXT']);
  234 + }
  235 +
  236 + return true;
216 237
217 } 238 }
218 239
  1 +# This file maps Internet media types to unique file extension(s).
  2 +# Although created for httpd, this file is used by many software systems
  3 +# and has been placed in the public domain for unlimited redisribution.
  4 +#
  5 +# The table below contains both registered and (common) unregistered types.
  6 +# A type that has no unique extension can be ignored -- they are listed
  7 +# here to guide configurations toward known types and to make it easier to
  8 +# identify "new" types. File extensions are also commonly used to indicate
  9 +# content languages and encodings, so choose them carefully.
  10 +#
  11 +# Internet media types should be registered as described in RFC 4288.
  12 +# The registry is at <http://www.iana.org/assignments/media-types/>.
  13 +#
  14 +# MIME type (lowercased) Extensions
  15 +# ============================================ ==========
  16 +# application/1d-interleaved-parityfec
  17 +# application/3gpdash-qoe-report+xml
  18 +# application/3gpp-ims+xml
  19 +# application/a2l
  20 +# application/activemessage
  21 +# application/alto-costmap+json
  22 +# application/alto-costmapfilter+json
  23 +# application/alto-directory+json
  24 +# application/alto-endpointcost+json
  25 +# application/alto-endpointcostparams+json
  26 +# application/alto-endpointprop+json
  27 +# application/alto-endpointpropparams+json
  28 +# application/alto-error+json
  29 +# application/alto-networkmap+json
  30 +# application/alto-networkmapfilter+json
  31 +# application/aml
  32 +application/andrew-inset ez
  33 +# application/applefile
  34 +application/applixware aw
  35 +# application/atf
  36 +# application/atfx
  37 +application/atom+xml atom
  38 +application/atomcat+xml atomcat
  39 +# application/atomdeleted+xml
  40 +# application/atomicmail
  41 +application/atomsvc+xml atomsvc
  42 +# application/atxml
  43 +# application/auth-policy+xml
  44 +# application/bacnet-xdd+zip
  45 +# application/batch-smtp
  46 +# application/beep+xml
  47 +# application/calendar+json
  48 +# application/calendar+xml
  49 +# application/call-completion
  50 +# application/cals-1840
  51 +# application/cbor
  52 +# application/ccmp+xml
  53 +application/ccxml+xml ccxml
  54 +# application/cdfx+xml
  55 +application/cdmi-capability cdmia
  56 +application/cdmi-container cdmic
  57 +application/cdmi-domain cdmid
  58 +application/cdmi-object cdmio
  59 +application/cdmi-queue cdmiq
  60 +# application/cdni
  61 +# application/cea
  62 +# application/cea-2018+xml
  63 +# application/cellml+xml
  64 +# application/cfw
  65 +# application/cms
  66 +# application/cnrp+xml
  67 +# application/coap-group+json
  68 +# application/commonground
  69 +# application/conference-info+xml
  70 +# application/cpl+xml
  71 +# application/csrattrs
  72 +# application/csta+xml
  73 +# application/cstadata+xml
  74 +# application/csvm+json
  75 +application/cu-seeme cu
  76 +# application/cybercash
  77 +# application/dash+xml
  78 +# application/dashdelta
  79 +application/davmount+xml davmount
  80 +# application/dca-rft
  81 +# application/dcd
  82 +# application/dec-dx
  83 +# application/dialog-info+xml
  84 +# application/dicom
  85 +# application/dii
  86 +# application/dit
  87 +# application/dns
  88 +application/docbook+xml dbk
  89 +# application/dskpp+xml
  90 +application/dssc+der dssc
  91 +application/dssc+xml xdssc
  92 +# application/dvcs
  93 +application/ecmascript ecma
  94 +# application/edi-consent
  95 +# application/edi-x12
  96 +# application/edifact
  97 +# application/efi
  98 +# application/emergencycalldata.comment+xml
  99 +# application/emergencycalldata.deviceinfo+xml
  100 +# application/emergencycalldata.providerinfo+xml
  101 +# application/emergencycalldata.serviceinfo+xml
  102 +# application/emergencycalldata.subscriberinfo+xml
  103 +application/emma+xml emma
  104 +# application/emotionml+xml
  105 +# application/encaprtp
  106 +# application/epp+xml
  107 +application/epub+zip epub
  108 +# application/eshop
  109 +# application/example
  110 +application/exi exi
  111 +# application/fastinfoset
  112 +# application/fastsoap
  113 +# application/fdt+xml
  114 +# application/fits
  115 +application/font-tdpfr pfr
  116 +# application/framework-attributes+xml
  117 +# application/geo+json
  118 +application/gml+xml gml
  119 +application/gpx+xml gpx
  120 +application/gxf gxf
  121 +# application/gzip
  122 +# application/h224
  123 +# application/held+xml
  124 +# application/http
  125 +application/hyperstudio stk
  126 +# application/ibe-key-request+xml
  127 +# application/ibe-pkg-reply+xml
  128 +# application/ibe-pp-data
  129 +# application/iges
  130 +# application/im-iscomposing+xml
  131 +# application/index
  132 +# application/index.cmd
  133 +# application/index.obj
  134 +# application/index.response
  135 +# application/index.vnd
  136 +application/inkml+xml ink inkml
  137 +# application/iotp
  138 +application/ipfix ipfix
  139 +# application/ipp
  140 +# application/isup
  141 +# application/its+xml
  142 +application/java-archive jar
  143 +application/java-serialized-object ser
  144 +application/java-vm class
  145 +# application/javascript
  146 +# application/jose
  147 +# application/jose+json
  148 +# application/jrd+json
  149 +application/json json
  150 +# application/json-patch+json
  151 +# application/json-seq
  152 +application/jsonml+json jsonml
  153 +# application/jwk+json
  154 +# application/jwk-set+json
  155 +# application/jwt
  156 +# application/kpml-request+xml
  157 +# application/kpml-response+xml
  158 +# application/ld+json
  159 +# application/lgr+xml
  160 +# application/link-format
  161 +# application/load-control+xml
  162 +application/lost+xml lostxml
  163 +# application/lostsync+xml
  164 +# application/lxf
  165 +application/mac-binhex40 hqx
  166 +application/mac-compactpro cpt
  167 +# application/macwriteii
  168 +application/mads+xml mads
  169 +application/marc mrc
  170 +application/marcxml+xml mrcx
  171 +application/mathematica ma nb mb
  172 +application/mathml+xml mathml
  173 +# application/mathml-content+xml
  174 +# application/mathml-presentation+xml
  175 +# application/mbms-associated-procedure-description+xml
  176 +# application/mbms-deregister+xml
  177 +# application/mbms-envelope+xml
  178 +# application/mbms-msk+xml
  179 +# application/mbms-msk-response+xml
  180 +# application/mbms-protection-description+xml
  181 +# application/mbms-reception-report+xml
  182 +# application/mbms-register+xml
  183 +# application/mbms-register-response+xml
  184 +# application/mbms-schedule+xml
  185 +# application/mbms-user-service-description+xml
  186 +application/mbox mbox
  187 +# application/media-policy-dataset+xml
  188 +# application/media_control+xml
  189 +application/mediaservercontrol+xml mscml
  190 +# application/merge-patch+json
  191 +application/metalink+xml metalink
  192 +application/metalink4+xml meta4
  193 +application/mets+xml mets
  194 +# application/mf4
  195 +# application/mikey
  196 +application/mods+xml mods
  197 +# application/moss-keys
  198 +# application/moss-signature
  199 +# application/mosskey-data
  200 +# application/mosskey-request
  201 +application/mp21 m21 mp21
  202 +application/mp4 mp4s
  203 +# application/mpeg4-generic
  204 +# application/mpeg4-iod
  205 +# application/mpeg4-iod-xmt
  206 +# application/mrb-consumer+xml
  207 +# application/mrb-publish+xml
  208 +# application/msc-ivr+xml
  209 +# application/msc-mixer+xml
  210 +application/msword doc dot
  211 +application/mxf mxf
  212 +# application/nasdata
  213 +# application/news-checkgroups
  214 +# application/news-groupinfo
  215 +# application/news-transmission
  216 +# application/nlsml+xml
  217 +# application/nss
  218 +# application/ocsp-request
  219 +# application/ocsp-response
  220 +application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy
  221 +application/oda oda
  222 +# application/odx
  223 +application/oebps-package+xml opf
  224 +application/ogg ogx
  225 +application/omdoc+xml omdoc
  226 +application/onenote onetoc onetoc2 onetmp onepkg
  227 +application/oxps oxps
  228 +# application/p2p-overlay+xml
  229 +# application/parityfec
  230 +application/patch-ops-error+xml xer
  231 +application/pdf pdf
  232 +# application/pdx
  233 +application/pgp-encrypted pgp
  234 +# application/pgp-keys
  235 +application/pgp-signature asc sig
  236 +application/pics-rules prf
  237 +# application/pidf+xml
  238 +# application/pidf-diff+xml
  239 +application/pkcs10 p10
  240 +# application/pkcs12
  241 +application/pkcs7-mime p7m p7c
  242 +application/pkcs7-signature p7s
  243 +application/pkcs8 p8
  244 +application/pkix-attr-cert ac
  245 +application/pkix-cert cer
  246 +application/pkix-crl crl
  247 +application/pkix-pkipath pkipath
  248 +application/pkixcmp pki
  249 +application/pls+xml pls
  250 +# application/poc-settings+xml
  251 +application/postscript ai eps ps
  252 +# application/ppsp-tracker+json
  253 +# application/problem+json
  254 +# application/problem+xml
  255 +# application/provenance+xml
  256 +# application/prs.alvestrand.titrax-sheet
  257 +application/prs.cww cww
  258 +# application/prs.hpub+zip
  259 +# application/prs.nprend
  260 +# application/prs.plucker
  261 +# application/prs.rdf-xml-crypt
  262 +# application/prs.xsf+xml
  263 +application/pskc+xml pskcxml
  264 +# application/qsig
  265 +# application/raptorfec
  266 +# application/rdap+json
  267 +application/rdf+xml rdf
  268 +application/reginfo+xml rif
  269 +application/relax-ng-compact-syntax rnc
  270 +# application/remote-printing
  271 +# application/reputon+json
  272 +application/resource-lists+xml rl
  273 +application/resource-lists-diff+xml rld
  274 +# application/rfc+xml
  275 +# application/riscos
  276 +# application/rlmi+xml
  277 +application/rls-services+xml rs
  278 +application/rpki-ghostbusters gbr
  279 +application/rpki-manifest mft
  280 +application/rpki-roa roa
  281 +# application/rpki-updown
  282 +application/rsd+xml rsd
  283 +application/rss+xml rss
  284 +application/rtf rtf
  285 +# application/rtploopback
  286 +# application/rtx
  287 +# application/samlassertion+xml
  288 +# application/samlmetadata+xml
  289 +application/sbml+xml sbml
  290 +# application/scaip+xml
  291 +# application/scim+json
  292 +application/scvp-cv-request scq
  293 +application/scvp-cv-response scs
  294 +application/scvp-vp-request spq
  295 +application/scvp-vp-response spp
  296 +application/sdp sdp
  297 +# application/sep+xml
  298 +# application/sep-exi
  299 +# application/session-info
  300 +# application/set-payment
  301 +application/set-payment-initiation setpay
  302 +# application/set-registration
  303 +application/set-registration-initiation setreg
  304 +# application/sgml
  305 +# application/sgml-open-catalog
  306 +application/shf+xml shf
  307 +# application/sieve
  308 +# application/simple-filter+xml
  309 +# application/simple-message-summary
  310 +# application/simplesymbolcontainer
  311 +# application/slate
  312 +# application/smil
  313 +application/smil+xml smi smil
  314 +# application/smpte336m
  315 +# application/soap+fastinfoset
  316 +# application/soap+xml
  317 +application/sparql-query rq
  318 +application/sparql-results+xml srx
  319 +# application/spirits-event+xml
  320 +# application/sql
  321 +application/srgs gram
  322 +application/srgs+xml grxml
  323 +application/sru+xml sru
  324 +application/ssdl+xml ssdl
  325 +application/ssml+xml ssml
  326 +# application/tamp-apex-update
  327 +# application/tamp-apex-update-confirm
  328 +# application/tamp-community-update
  329 +# application/tamp-community-update-confirm
  330 +# application/tamp-error
  331 +# application/tamp-sequence-adjust
  332 +# application/tamp-sequence-adjust-confirm
  333 +# application/tamp-status-query
  334 +# application/tamp-status-response
  335 +# application/tamp-update
  336 +# application/tamp-update-confirm
  337 +application/tei+xml tei teicorpus
  338 +application/thraud+xml tfi
  339 +# application/timestamp-query
  340 +# application/timestamp-reply
  341 +application/timestamped-data tsd
  342 +# application/ttml+xml
  343 +# application/tve-trigger
  344 +# application/ulpfec
  345 +# application/urc-grpsheet+xml
  346 +# application/urc-ressheet+xml
  347 +# application/urc-targetdesc+xml
  348 +# application/urc-uisocketdesc+xml
  349 +# application/vcard+json
  350 +# application/vcard+xml
  351 +# application/vemmi
  352 +# application/vividence.scriptfile
  353 +# application/vnd.3gpp-prose+xml
  354 +# application/vnd.3gpp-prose-pc3ch+xml
  355 +# application/vnd.3gpp.access-transfer-events+xml
  356 +# application/vnd.3gpp.bsf+xml
  357 +# application/vnd.3gpp.mid-call+xml
  358 +application/vnd.3gpp.pic-bw-large plb
  359 +application/vnd.3gpp.pic-bw-small psb
  360 +application/vnd.3gpp.pic-bw-var pvb
  361 +# application/vnd.3gpp.sms
  362 +# application/vnd.3gpp.sms+xml
  363 +# application/vnd.3gpp.srvcc-ext+xml
  364 +# application/vnd.3gpp.srvcc-info+xml
  365 +# application/vnd.3gpp.state-and-event-info+xml
  366 +# application/vnd.3gpp.ussd+xml
  367 +# application/vnd.3gpp2.bcmcsinfo+xml
  368 +# application/vnd.3gpp2.sms
  369 +application/vnd.3gpp2.tcap tcap
  370 +# application/vnd.3lightssoftware.imagescal
  371 +application/vnd.3m.post-it-notes pwn
  372 +application/vnd.accpac.simply.aso aso
  373 +application/vnd.accpac.simply.imp imp
  374 +application/vnd.acucobol acu
  375 +application/vnd.acucorp atc acutc
  376 +application/vnd.adobe.air-application-installer-package+zip air
  377 +# application/vnd.adobe.flash.movie
  378 +application/vnd.adobe.formscentral.fcdt fcdt
  379 +application/vnd.adobe.fxp fxp fxpl
  380 +# application/vnd.adobe.partial-upload
  381 +application/vnd.adobe.xdp+xml xdp
  382 +application/vnd.adobe.xfdf xfdf
  383 +# application/vnd.aether.imp
  384 +# application/vnd.ah-barcode
  385 +application/vnd.ahead.space ahead
  386 +application/vnd.airzip.filesecure.azf azf
  387 +application/vnd.airzip.filesecure.azs azs
  388 +application/vnd.amazon.ebook azw
  389 +# application/vnd.amazon.mobi8-ebook
  390 +application/vnd.americandynamics.acc acc
  391 +application/vnd.amiga.ami ami
  392 +# application/vnd.amundsen.maze+xml
  393 +application/vnd.android.package-archive apk
  394 +# application/vnd.anki
  395 +application/vnd.anser-web-certificate-issue-initiation cii
  396 +application/vnd.anser-web-funds-transfer-initiation fti
  397 +application/vnd.antix.game-component atx
  398 +# application/vnd.apache.thrift.binary
  399 +# application/vnd.apache.thrift.compact
  400 +# application/vnd.apache.thrift.json
  401 +# application/vnd.api+json
  402 +application/vnd.apple.installer+xml mpkg
  403 +application/vnd.apple.mpegurl m3u8
  404 +# application/vnd.arastra.swi
  405 +application/vnd.aristanetworks.swi swi
  406 +# application/vnd.artsquare
  407 +application/vnd.astraea-software.iota iota
  408 +application/vnd.audiograph aep
  409 +# application/vnd.autopackage
  410 +# application/vnd.avistar+xml
  411 +# application/vnd.balsamiq.bmml+xml
  412 +# application/vnd.balsamiq.bmpr
  413 +# application/vnd.bekitzur-stech+json
  414 +# application/vnd.biopax.rdf+xml
  415 +application/vnd.blueice.multipass mpm
  416 +# application/vnd.bluetooth.ep.oob
  417 +# application/vnd.bluetooth.le.oob
  418 +application/vnd.bmi bmi
  419 +application/vnd.businessobjects rep
  420 +# application/vnd.cab-jscript
  421 +# application/vnd.canon-cpdl
  422 +# application/vnd.canon-lips
  423 +# application/vnd.cendio.thinlinc.clientconf
  424 +# application/vnd.century-systems.tcp_stream
  425 +application/vnd.chemdraw+xml cdxml
  426 +# application/vnd.chess-pgn
  427 +application/vnd.chipnuts.karaoke-mmd mmd
  428 +application/vnd.cinderella cdy
  429 +# application/vnd.cirpack.isdn-ext
  430 +# application/vnd.citationstyles.style+xml
  431 +application/vnd.claymore cla
  432 +application/vnd.cloanto.rp9 rp9
  433 +application/vnd.clonk.c4group c4g c4d c4f c4p c4u
  434 +application/vnd.cluetrust.cartomobile-config c11amc
  435 +application/vnd.cluetrust.cartomobile-config-pkg c11amz
  436 +# application/vnd.coffeescript
  437 +# application/vnd.collection+json
  438 +# application/vnd.collection.doc+json
  439 +# application/vnd.collection.next+json
  440 +# application/vnd.comicbook+zip
  441 +# application/vnd.commerce-battelle
  442 +application/vnd.commonspace csp
  443 +application/vnd.contact.cmsg cdbcmsg
  444 +# application/vnd.coreos.ignition+json
  445 +application/vnd.cosmocaller cmc
  446 +application/vnd.crick.clicker clkx
  447 +application/vnd.crick.clicker.keyboard clkk
  448 +application/vnd.crick.clicker.palette clkp
  449 +application/vnd.crick.clicker.template clkt
  450 +application/vnd.crick.clicker.wordbank clkw
  451 +application/vnd.criticaltools.wbs+xml wbs
  452 +application/vnd.ctc-posml pml
  453 +# application/vnd.ctct.ws+xml
  454 +# application/vnd.cups-pdf
  455 +# application/vnd.cups-postscript
  456 +application/vnd.cups-ppd ppd
  457 +# application/vnd.cups-raster
  458 +# application/vnd.cups-raw
  459 +# application/vnd.curl
  460 +application/vnd.curl.car car
  461 +application/vnd.curl.pcurl pcurl
  462 +# application/vnd.cyan.dean.root+xml
  463 +# application/vnd.cybank
  464 +application/vnd.dart dart
  465 +application/vnd.data-vision.rdz rdz
  466 +# application/vnd.debian.binary-package
  467 +application/vnd.dece.data uvf uvvf uvd uvvd
  468 +application/vnd.dece.ttml+xml uvt uvvt
  469 +application/vnd.dece.unspecified uvx uvvx
  470 +application/vnd.dece.zip uvz uvvz
  471 +application/vnd.denovo.fcselayout-link fe_launch
  472 +# application/vnd.desmume.movie
  473 +# application/vnd.dir-bi.plate-dl-nosuffix
  474 +# application/vnd.dm.delegation+xml
  475 +application/vnd.dna dna
  476 +# application/vnd.document+json
  477 +application/vnd.dolby.mlp mlp
  478 +# application/vnd.dolby.mobile.1
  479 +# application/vnd.dolby.mobile.2
  480 +# application/vnd.doremir.scorecloud-binary-document
  481 +application/vnd.dpgraph dpg
  482 +application/vnd.dreamfactory dfac
  483 +# application/vnd.drive+json
  484 +application/vnd.ds-keypoint kpxx
  485 +# application/vnd.dtg.local
  486 +# application/vnd.dtg.local.flash
  487 +# application/vnd.dtg.local.html
  488 +application/vnd.dvb.ait ait
  489 +# application/vnd.dvb.dvbj
  490 +# application/vnd.dvb.esgcontainer
  491 +# application/vnd.dvb.ipdcdftnotifaccess
  492 +# application/vnd.dvb.ipdcesgaccess
  493 +# application/vnd.dvb.ipdcesgaccess2
  494 +# application/vnd.dvb.ipdcesgpdd
  495 +# application/vnd.dvb.ipdcroaming
  496 +# application/vnd.dvb.iptv.alfec-base
  497 +# application/vnd.dvb.iptv.alfec-enhancement
  498 +# application/vnd.dvb.notif-aggregate-root+xml
  499 +# application/vnd.dvb.notif-container+xml
  500 +# application/vnd.dvb.notif-generic+xml
  501 +# application/vnd.dvb.notif-ia-msglist+xml
  502 +# application/vnd.dvb.notif-ia-registration-request+xml
  503 +# application/vnd.dvb.notif-ia-registration-response+xml
  504 +# application/vnd.dvb.notif-init+xml
  505 +# application/vnd.dvb.pfr
  506 +application/vnd.dvb.service svc
  507 +# application/vnd.dxr
  508 +application/vnd.dynageo geo
  509 +# application/vnd.dzr
  510 +# application/vnd.easykaraoke.cdgdownload
  511 +# application/vnd.ecdis-update
  512 +application/vnd.ecowin.chart mag
  513 +# application/vnd.ecowin.filerequest
  514 +# application/vnd.ecowin.fileupdate
  515 +# application/vnd.ecowin.series
  516 +# application/vnd.ecowin.seriesrequest
  517 +# application/vnd.ecowin.seriesupdate
  518 +# application/vnd.emclient.accessrequest+xml
  519 +application/vnd.enliven nml
  520 +# application/vnd.enphase.envoy
  521 +# application/vnd.eprints.data+xml
  522 +application/vnd.epson.esf esf
  523 +application/vnd.epson.msf msf
  524 +application/vnd.epson.quickanime qam
  525 +application/vnd.epson.salt slt
  526 +application/vnd.epson.ssf ssf
  527 +# application/vnd.ericsson.quickcall
  528 +application/vnd.eszigno3+xml es3 et3
  529 +# application/vnd.etsi.aoc+xml
  530 +# application/vnd.etsi.asic-e+zip
  531 +# application/vnd.etsi.asic-s+zip
  532 +# application/vnd.etsi.cug+xml
  533 +# application/vnd.etsi.iptvcommand+xml
  534 +# application/vnd.etsi.iptvdiscovery+xml
  535 +# application/vnd.etsi.iptvprofile+xml
  536 +# application/vnd.etsi.iptvsad-bc+xml
  537 +# application/vnd.etsi.iptvsad-cod+xml
  538 +# application/vnd.etsi.iptvsad-npvr+xml
  539 +# application/vnd.etsi.iptvservice+xml
  540 +# application/vnd.etsi.iptvsync+xml
  541 +# application/vnd.etsi.iptvueprofile+xml
  542 +# application/vnd.etsi.mcid+xml
  543 +# application/vnd.etsi.mheg5
  544 +# application/vnd.etsi.overload-control-policy-dataset+xml
  545 +# application/vnd.etsi.pstn+xml
  546 +# application/vnd.etsi.sci+xml
  547 +# application/vnd.etsi.simservs+xml
  548 +# application/vnd.etsi.timestamp-token
  549 +# application/vnd.etsi.tsl+xml
  550 +# application/vnd.etsi.tsl.der
  551 +# application/vnd.eudora.data
  552 +application/vnd.ezpix-album ez2
  553 +application/vnd.ezpix-package ez3
  554 +# application/vnd.f-secure.mobile
  555 +# application/vnd.fastcopy-disk-image
  556 +application/vnd.fdf fdf
  557 +application/vnd.fdsn.mseed mseed
  558 +application/vnd.fdsn.seed seed dataless
  559 +# application/vnd.ffsns
  560 +# application/vnd.filmit.zfc
  561 +# application/vnd.fints
  562 +# application/vnd.firemonkeys.cloudcell
  563 +application/vnd.flographit gph
  564 +application/vnd.fluxtime.clip ftc
  565 +# application/vnd.font-fontforge-sfd
  566 +application/vnd.framemaker fm frame maker book
  567 +application/vnd.frogans.fnc fnc
  568 +application/vnd.frogans.ltf ltf
  569 +application/vnd.fsc.weblaunch fsc
  570 +application/vnd.fujitsu.oasys oas
  571 +application/vnd.fujitsu.oasys2 oa2
  572 +application/vnd.fujitsu.oasys3 oa3
  573 +application/vnd.fujitsu.oasysgp fg5
  574 +application/vnd.fujitsu.oasysprs bh2
  575 +# application/vnd.fujixerox.art-ex
  576 +# application/vnd.fujixerox.art4
  577 +application/vnd.fujixerox.ddd ddd
  578 +application/vnd.fujixerox.docuworks xdw
  579 +application/vnd.fujixerox.docuworks.binder xbd
  580 +# application/vnd.fujixerox.docuworks.container
  581 +# application/vnd.fujixerox.hbpl
  582 +# application/vnd.fut-misnet
  583 +application/vnd.fuzzysheet fzs
  584 +application/vnd.genomatix.tuxedo txd
  585 +# application/vnd.geo+json
  586 +# application/vnd.geocube+xml
  587 +application/vnd.geogebra.file ggb
  588 +application/vnd.geogebra.tool ggt
  589 +application/vnd.geometry-explorer gex gre
  590 +application/vnd.geonext gxt
  591 +application/vnd.geoplan g2w
  592 +application/vnd.geospace g3w
  593 +# application/vnd.gerber
  594 +# application/vnd.globalplatform.card-content-mgt
  595 +# application/vnd.globalplatform.card-content-mgt-response
  596 +application/vnd.gmx gmx
  597 +application/vnd.google-earth.kml+xml kml
  598 +application/vnd.google-earth.kmz kmz
  599 +# application/vnd.gov.sk.e-form+xml
  600 +# application/vnd.gov.sk.e-form+zip
  601 +# application/vnd.gov.sk.xmldatacontainer+xml
  602 +application/vnd.grafeq gqf gqs
  603 +# application/vnd.gridmp
  604 +application/vnd.groove-account gac
  605 +application/vnd.groove-help ghf
  606 +application/vnd.groove-identity-message gim
  607 +application/vnd.groove-injector grv
  608 +application/vnd.groove-tool-message gtm
  609 +application/vnd.groove-tool-template tpl
  610 +application/vnd.groove-vcard vcg
  611 +# application/vnd.hal+json
  612 +application/vnd.hal+xml hal
  613 +application/vnd.handheld-entertainment+xml zmm
  614 +application/vnd.hbci hbci
  615 +# application/vnd.hcl-bireports
  616 +# application/vnd.hdt
  617 +# application/vnd.heroku+json
  618 +application/vnd.hhe.lesson-player les
  619 +application/vnd.hp-hpgl hpgl
  620 +application/vnd.hp-hpid hpid
  621 +application/vnd.hp-hps hps
  622 +application/vnd.hp-jlyt jlt
  623 +application/vnd.hp-pcl pcl
  624 +application/vnd.hp-pclxl pclxl
  625 +# application/vnd.httphone
  626 +application/vnd.hydrostatix.sof-data sfd-hdstx
  627 +# application/vnd.hyperdrive+json
  628 +# application/vnd.hzn-3d-crossword
  629 +# application/vnd.ibm.afplinedata
  630 +# application/vnd.ibm.electronic-media
  631 +application/vnd.ibm.minipay mpy
  632 +application/vnd.ibm.modcap afp listafp list3820
  633 +application/vnd.ibm.rights-management irm
  634 +application/vnd.ibm.secure-container sc
  635 +application/vnd.iccprofile icc icm
  636 +# application/vnd.ieee.1905
  637 +application/vnd.igloader igl
  638 +application/vnd.immervision-ivp ivp
  639 +application/vnd.immervision-ivu ivu
  640 +# application/vnd.ims.imsccv1p1
  641 +# application/vnd.ims.imsccv1p2
  642 +# application/vnd.ims.imsccv1p3
  643 +# application/vnd.ims.lis.v2.result+json
  644 +# application/vnd.ims.lti.v2.toolconsumerprofile+json
  645 +# application/vnd.ims.lti.v2.toolproxy+json
  646 +# application/vnd.ims.lti.v2.toolproxy.id+json
  647 +# application/vnd.ims.lti.v2.toolsettings+json
  648 +# application/vnd.ims.lti.v2.toolsettings.simple+json
  649 +# application/vnd.informedcontrol.rms+xml
  650 +# application/vnd.informix-visionary
  651 +# application/vnd.infotech.project
  652 +# application/vnd.infotech.project+xml
  653 +# application/vnd.innopath.wamp.notification
  654 +application/vnd.insors.igm igm
  655 +application/vnd.intercon.formnet xpw xpx
  656 +application/vnd.intergeo i2g
  657 +# application/vnd.intertrust.digibox
  658 +# application/vnd.intertrust.nncp
  659 +application/vnd.intu.qbo qbo
  660 +application/vnd.intu.qfx qfx
  661 +# application/vnd.iptc.g2.catalogitem+xml
  662 +# application/vnd.iptc.g2.conceptitem+xml
  663 +# application/vnd.iptc.g2.knowledgeitem+xml
  664 +# application/vnd.iptc.g2.newsitem+xml
  665 +# application/vnd.iptc.g2.newsmessage+xml
  666 +# application/vnd.iptc.g2.packageitem+xml
  667 +# application/vnd.iptc.g2.planningitem+xml
  668 +application/vnd.ipunplugged.rcprofile rcprofile
  669 +application/vnd.irepository.package+xml irp
  670 +application/vnd.is-xpr xpr
  671 +application/vnd.isac.fcs fcs
  672 +application/vnd.jam jam
  673 +# application/vnd.japannet-directory-service
  674 +# application/vnd.japannet-jpnstore-wakeup
  675 +# application/vnd.japannet-payment-wakeup
  676 +# application/vnd.japannet-registration
  677 +# application/vnd.japannet-registration-wakeup
  678 +# application/vnd.japannet-setstore-wakeup
  679 +# application/vnd.japannet-verification
  680 +# application/vnd.japannet-verification-wakeup
  681 +application/vnd.jcp.javame.midlet-rms rms
  682 +application/vnd.jisp jisp
  683 +application/vnd.joost.joda-archive joda
  684 +# application/vnd.jsk.isdn-ngn
  685 +application/vnd.kahootz ktz ktr
  686 +application/vnd.kde.karbon karbon
  687 +application/vnd.kde.kchart chrt
  688 +application/vnd.kde.kformula kfo
  689 +application/vnd.kde.kivio flw
  690 +application/vnd.kde.kontour kon
  691 +application/vnd.kde.kpresenter kpr kpt
  692 +application/vnd.kde.kspread ksp
  693 +application/vnd.kde.kword kwd kwt
  694 +application/vnd.kenameaapp htke
  695 +application/vnd.kidspiration kia
  696 +application/vnd.kinar kne knp
  697 +application/vnd.koan skp skd skt skm
  698 +application/vnd.kodak-descriptor sse
  699 +application/vnd.las.las+xml lasxml
  700 +# application/vnd.liberty-request+xml
  701 +application/vnd.llamagraphics.life-balance.desktop lbd
  702 +application/vnd.llamagraphics.life-balance.exchange+xml lbe
  703 +application/vnd.lotus-1-2-3 123
  704 +application/vnd.lotus-approach apr
  705 +application/vnd.lotus-freelance pre
  706 +application/vnd.lotus-notes nsf
  707 +application/vnd.lotus-organizer org
  708 +application/vnd.lotus-screencam scm
  709 +application/vnd.lotus-wordpro lwp
  710 +application/vnd.macports.portpkg portpkg
  711 +# application/vnd.mapbox-vector-tile
  712 +# application/vnd.marlin.drm.actiontoken+xml
  713 +# application/vnd.marlin.drm.conftoken+xml
  714 +# application/vnd.marlin.drm.license+xml
  715 +# application/vnd.marlin.drm.mdcf
  716 +# application/vnd.mason+json
  717 +# application/vnd.maxmind.maxmind-db
  718 +application/vnd.mcd mcd
  719 +application/vnd.medcalcdata mc1
  720 +application/vnd.mediastation.cdkey cdkey
  721 +# application/vnd.meridian-slingshot
  722 +application/vnd.mfer mwf
  723 +application/vnd.mfmp mfm
  724 +# application/vnd.micro+json
  725 +application/vnd.micrografx.flo flo
  726 +application/vnd.micrografx.igx igx
  727 +# application/vnd.microsoft.portable-executable
  728 +# application/vnd.miele+json
  729 +application/vnd.mif mif
  730 +# application/vnd.minisoft-hp3000-save
  731 +# application/vnd.mitsubishi.misty-guard.trustweb
  732 +application/vnd.mobius.daf daf
  733 +application/vnd.mobius.dis dis
  734 +application/vnd.mobius.mbk mbk
  735 +application/vnd.mobius.mqy mqy
  736 +application/vnd.mobius.msl msl
  737 +application/vnd.mobius.plc plc
  738 +application/vnd.mobius.txf txf
  739 +application/vnd.mophun.application mpn
  740 +application/vnd.mophun.certificate mpc
  741 +# application/vnd.motorola.flexsuite
  742 +# application/vnd.motorola.flexsuite.adsi
  743 +# application/vnd.motorola.flexsuite.fis
  744 +# application/vnd.motorola.flexsuite.gotap
  745 +# application/vnd.motorola.flexsuite.kmr
  746 +# application/vnd.motorola.flexsuite.ttc
  747 +# application/vnd.motorola.flexsuite.wem
  748 +# application/vnd.motorola.iprm
  749 +application/vnd.mozilla.xul+xml xul
  750 +# application/vnd.ms-3mfdocument
  751 +application/vnd.ms-artgalry cil
  752 +# application/vnd.ms-asf
  753 +application/vnd.ms-cab-compressed cab
  754 +# application/vnd.ms-color.iccprofile
  755 +application/vnd.ms-excel xls xlm xla xlc xlt xlw
  756 +application/vnd.ms-excel.addin.macroenabled.12 xlam
  757 +application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb
  758 +application/vnd.ms-excel.sheet.macroenabled.12 xlsm
  759 +application/vnd.ms-excel.template.macroenabled.12 xltm
  760 +application/vnd.ms-fontobject eot
  761 +application/vnd.ms-htmlhelp chm
  762 +application/vnd.ms-ims ims
  763 +application/vnd.ms-lrm lrm
  764 +# application/vnd.ms-office.activex+xml
  765 +application/vnd.ms-officetheme thmx
  766 +# application/vnd.ms-opentype
  767 +# application/vnd.ms-package.obfuscated-opentype
  768 +application/vnd.ms-pki.seccat cat
  769 +application/vnd.ms-pki.stl stl
  770 +# application/vnd.ms-playready.initiator+xml
  771 +application/vnd.ms-powerpoint ppt pps pot
  772 +application/vnd.ms-powerpoint.addin.macroenabled.12 ppam
  773 +application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm
  774 +application/vnd.ms-powerpoint.slide.macroenabled.12 sldm
  775 +application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm
  776 +application/vnd.ms-powerpoint.template.macroenabled.12 potm
  777 +# application/vnd.ms-printdevicecapabilities+xml
  778 +# application/vnd.ms-printing.printticket+xml
  779 +# application/vnd.ms-printschematicket+xml
  780 +application/vnd.ms-project mpp mpt
  781 +# application/vnd.ms-tnef
  782 +# application/vnd.ms-windows.devicepairing
  783 +# application/vnd.ms-windows.nwprinting.oob
  784 +# application/vnd.ms-windows.printerpairing
  785 +# application/vnd.ms-windows.wsd.oob
  786 +# application/vnd.ms-wmdrm.lic-chlg-req
  787 +# application/vnd.ms-wmdrm.lic-resp
  788 +# application/vnd.ms-wmdrm.meter-chlg-req
  789 +# application/vnd.ms-wmdrm.meter-resp
  790 +application/vnd.ms-word.document.macroenabled.12 docm
  791 +application/vnd.ms-word.template.macroenabled.12 dotm
  792 +application/vnd.ms-works wps wks wcm wdb
  793 +application/vnd.ms-wpl wpl
  794 +application/vnd.ms-xpsdocument xps
  795 +# application/vnd.msa-disk-image
  796 +application/vnd.mseq mseq
  797 +# application/vnd.msign
  798 +# application/vnd.multiad.creator
  799 +# application/vnd.multiad.creator.cif
  800 +# application/vnd.music-niff
  801 +application/vnd.musician mus
  802 +application/vnd.muvee.style msty
  803 +application/vnd.mynfc taglet
  804 +# application/vnd.ncd.control
  805 +# application/vnd.ncd.reference
  806 +# application/vnd.nervana
  807 +# application/vnd.netfpx
  808 +application/vnd.neurolanguage.nlu nlu
  809 +# application/vnd.nintendo.nitro.rom
  810 +# application/vnd.nintendo.snes.rom
  811 +application/vnd.nitf ntf nitf
  812 +application/vnd.noblenet-directory nnd
  813 +application/vnd.noblenet-sealer nns
  814 +application/vnd.noblenet-web nnw
  815 +# application/vnd.nokia.catalogs
  816 +# application/vnd.nokia.conml+wbxml
  817 +# application/vnd.nokia.conml+xml
  818 +# application/vnd.nokia.iptv.config+xml
  819 +# application/vnd.nokia.isds-radio-presets
  820 +# application/vnd.nokia.landmark+wbxml
  821 +# application/vnd.nokia.landmark+xml
  822 +# application/vnd.nokia.landmarkcollection+xml
  823 +# application/vnd.nokia.n-gage.ac+xml
  824 +application/vnd.nokia.n-gage.data ngdat
  825 +application/vnd.nokia.n-gage.symbian.install n-gage
  826 +# application/vnd.nokia.ncd
  827 +# application/vnd.nokia.pcd+wbxml
  828 +# application/vnd.nokia.pcd+xml
  829 +application/vnd.nokia.radio-preset rpst
  830 +application/vnd.nokia.radio-presets rpss
  831 +application/vnd.novadigm.edm edm
  832 +application/vnd.novadigm.edx edx
  833 +application/vnd.novadigm.ext ext
  834 +# application/vnd.ntt-local.content-share
  835 +# application/vnd.ntt-local.file-transfer
  836 +# application/vnd.ntt-local.ogw_remote-access
  837 +# application/vnd.ntt-local.sip-ta_remote
  838 +# application/vnd.ntt-local.sip-ta_tcp_stream
  839 +application/vnd.oasis.opendocument.chart odc
  840 +application/vnd.oasis.opendocument.chart-template otc
  841 +application/vnd.oasis.opendocument.database odb
  842 +application/vnd.oasis.opendocument.formula odf
  843 +application/vnd.oasis.opendocument.formula-template odft
  844 +application/vnd.oasis.opendocument.graphics odg
  845 +application/vnd.oasis.opendocument.graphics-template otg
  846 +application/vnd.oasis.opendocument.image odi
  847 +application/vnd.oasis.opendocument.image-template oti
  848 +application/vnd.oasis.opendocument.presentation odp
  849 +application/vnd.oasis.opendocument.presentation-template otp
  850 +application/vnd.oasis.opendocument.spreadsheet ods
  851 +application/vnd.oasis.opendocument.spreadsheet-template ots
  852 +application/vnd.oasis.opendocument.text odt
  853 +application/vnd.oasis.opendocument.text-master odm
  854 +application/vnd.oasis.opendocument.text-template ott
  855 +application/vnd.oasis.opendocument.text-web oth
  856 +# application/vnd.obn
  857 +# application/vnd.oftn.l10n+json
  858 +# application/vnd.oipf.contentaccessdownload+xml
  859 +# application/vnd.oipf.contentaccessstreaming+xml
  860 +# application/vnd.oipf.cspg-hexbinary
  861 +# application/vnd.oipf.dae.svg+xml
  862 +# application/vnd.oipf.dae.xhtml+xml
  863 +# application/vnd.oipf.mippvcontrolmessage+xml
  864 +# application/vnd.oipf.pae.gem
  865 +# application/vnd.oipf.spdiscovery+xml
  866 +# application/vnd.oipf.spdlist+xml
  867 +# application/vnd.oipf.ueprofile+xml
  868 +# application/vnd.oipf.userprofile+xml
  869 +application/vnd.olpc-sugar xo
  870 +# application/vnd.oma-scws-config
  871 +# application/vnd.oma-scws-http-request
  872 +# application/vnd.oma-scws-http-response
  873 +# application/vnd.oma.bcast.associated-procedure-parameter+xml
  874 +# application/vnd.oma.bcast.drm-trigger+xml
  875 +# application/vnd.oma.bcast.imd+xml
  876 +# application/vnd.oma.bcast.ltkm
  877 +# application/vnd.oma.bcast.notification+xml
  878 +# application/vnd.oma.bcast.provisioningtrigger
  879 +# application/vnd.oma.bcast.sgboot
  880 +# application/vnd.oma.bcast.sgdd+xml
  881 +# application/vnd.oma.bcast.sgdu
  882 +# application/vnd.oma.bcast.simple-symbol-container
  883 +# application/vnd.oma.bcast.smartcard-trigger+xml
  884 +# application/vnd.oma.bcast.sprov+xml
  885 +# application/vnd.oma.bcast.stkm
  886 +# application/vnd.oma.cab-address-book+xml
  887 +# application/vnd.oma.cab-feature-handler+xml
  888 +# application/vnd.oma.cab-pcc+xml
  889 +# application/vnd.oma.cab-subs-invite+xml
  890 +# application/vnd.oma.cab-user-prefs+xml
  891 +# application/vnd.oma.dcd
  892 +# application/vnd.oma.dcdc
  893 +application/vnd.oma.dd2+xml dd2
  894 +# application/vnd.oma.drm.risd+xml
  895 +# application/vnd.oma.group-usage-list+xml
  896 +# application/vnd.oma.lwm2m+json
  897 +# application/vnd.oma.lwm2m+tlv
  898 +# application/vnd.oma.pal+xml
  899 +# application/vnd.oma.poc.detailed-progress-report+xml
  900 +# application/vnd.oma.poc.final-report+xml
  901 +# application/vnd.oma.poc.groups+xml
  902 +# application/vnd.oma.poc.invocation-descriptor+xml
  903 +# application/vnd.oma.poc.optimized-progress-report+xml
  904 +# application/vnd.oma.push
  905 +# application/vnd.oma.scidm.messages+xml
  906 +# application/vnd.oma.xcap-directory+xml
  907 +# application/vnd.omads-email+xml
  908 +# application/vnd.omads-file+xml
  909 +# application/vnd.omads-folder+xml
  910 +# application/vnd.omaloc-supl-init
  911 +# application/vnd.onepager
  912 +# application/vnd.openblox.game+xml
  913 +# application/vnd.openblox.game-binary
  914 +# application/vnd.openeye.oeb
  915 +application/vnd.openofficeorg.extension oxt
  916 +# application/vnd.openxmlformats-officedocument.custom-properties+xml
  917 +# application/vnd.openxmlformats-officedocument.customxmlproperties+xml
  918 +# application/vnd.openxmlformats-officedocument.drawing+xml
  919 +# application/vnd.openxmlformats-officedocument.drawingml.chart+xml
  920 +# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml
  921 +# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml
  922 +# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml
  923 +# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml
  924 +# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml
  925 +# application/vnd.openxmlformats-officedocument.extended-properties+xml
  926 +# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml
  927 +# application/vnd.openxmlformats-officedocument.presentationml.comments+xml
  928 +# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml
  929 +# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml
  930 +# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml
  931 +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
  932 +# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml
  933 +# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml
  934 +application/vnd.openxmlformats-officedocument.presentationml.slide sldx
  935 +# application/vnd.openxmlformats-officedocument.presentationml.slide+xml
  936 +# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml
  937 +# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml
  938 +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
  939 +# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml
  940 +# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml
  941 +# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml
  942 +# application/vnd.openxmlformats-officedocument.presentationml.tags+xml
  943 +application/vnd.openxmlformats-officedocument.presentationml.template potx
  944 +# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml
  945 +# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml
  946 +# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml
  947 +# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml
  948 +# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml
  949 +# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml
  950 +# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml
  951 +# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml
  952 +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml
  953 +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml
  954 +# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml
  955 +# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml
  956 +# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml
  957 +# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml
  958 +# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml
  959 +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
  960 +# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml
  961 +# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml
  962 +# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml
  963 +# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml
  964 +# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml
  965 +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
  966 +# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml
  967 +# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml
  968 +# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml
  969 +# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml
  970 +# application/vnd.openxmlformats-officedocument.theme+xml
  971 +# application/vnd.openxmlformats-officedocument.themeoverride+xml
  972 +# application/vnd.openxmlformats-officedocument.vmldrawing
  973 +# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml
  974 +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
  975 +# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml
  976 +# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml
  977 +# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml
  978 +# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml
  979 +# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
  980 +# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml
  981 +# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml
  982 +# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml
  983 +# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml
  984 +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
  985 +# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml
  986 +# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml
  987 +# application/vnd.openxmlformats-package.core-properties+xml
  988 +# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml
  989 +# application/vnd.openxmlformats-package.relationships+xml
  990 +# application/vnd.oracle.resource+json
  991 +# application/vnd.orange.indata
  992 +# application/vnd.osa.netdeploy
  993 +application/vnd.osgeo.mapguide.package mgp
  994 +# application/vnd.osgi.bundle
  995 +application/vnd.osgi.dp dp
  996 +application/vnd.osgi.subsystem esa
  997 +# application/vnd.otps.ct-kip+xml
  998 +# application/vnd.oxli.countgraph
  999 +# application/vnd.pagerduty+json
  1000 +application/vnd.palm pdb pqa oprc
  1001 +# application/vnd.panoply
  1002 +# application/vnd.paos.xml
  1003 +application/vnd.pawaafile paw
  1004 +# application/vnd.pcos
  1005 +application/vnd.pg.format str
  1006 +application/vnd.pg.osasli ei6
  1007 +# application/vnd.piaccess.application-licence
  1008 +application/vnd.picsel efif
  1009 +application/vnd.pmi.widget wg
  1010 +# application/vnd.poc.group-advertisement+xml
  1011 +application/vnd.pocketlearn plf
  1012 +application/vnd.powerbuilder6 pbd
  1013 +# application/vnd.powerbuilder6-s
  1014 +# application/vnd.powerbuilder7
  1015 +# application/vnd.powerbuilder7-s
  1016 +# application/vnd.powerbuilder75
  1017 +# application/vnd.powerbuilder75-s
  1018 +# application/vnd.preminet
  1019 +application/vnd.previewsystems.box box
  1020 +application/vnd.proteus.magazine mgz
  1021 +application/vnd.publishare-delta-tree qps
  1022 +application/vnd.pvi.ptid1 ptid
  1023 +# application/vnd.pwg-multiplexed
  1024 +# application/vnd.pwg-xhtml-print+xml
  1025 +# application/vnd.qualcomm.brew-app-res
  1026 +# application/vnd.quarantainenet
  1027 +application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb
  1028 +# application/vnd.quobject-quoxdocument
  1029 +# application/vnd.radisys.moml+xml
  1030 +# application/vnd.radisys.msml+xml
  1031 +# application/vnd.radisys.msml-audit+xml
  1032 +# application/vnd.radisys.msml-audit-conf+xml
  1033 +# application/vnd.radisys.msml-audit-conn+xml
  1034 +# application/vnd.radisys.msml-audit-dialog+xml
  1035 +# application/vnd.radisys.msml-audit-stream+xml
  1036 +# application/vnd.radisys.msml-conf+xml
  1037 +# application/vnd.radisys.msml-dialog+xml
  1038 +# application/vnd.radisys.msml-dialog-base+xml
  1039 +# application/vnd.radisys.msml-dialog-fax-detect+xml
  1040 +# application/vnd.radisys.msml-dialog-fax-sendrecv+xml
  1041 +# application/vnd.radisys.msml-dialog-group+xml
  1042 +# application/vnd.radisys.msml-dialog-speech+xml
  1043 +# application/vnd.radisys.msml-dialog-transform+xml
  1044 +# application/vnd.rainstor.data
  1045 +# application/vnd.rapid
  1046 +# application/vnd.rar
  1047 +application/vnd.realvnc.bed bed
  1048 +application/vnd.recordare.musicxml mxl
  1049 +application/vnd.recordare.musicxml+xml musicxml
  1050 +# application/vnd.renlearn.rlprint
  1051 +application/vnd.rig.cryptonote cryptonote
  1052 +application/vnd.rim.cod cod
  1053 +application/vnd.rn-realmedia rm
  1054 +application/vnd.rn-realmedia-vbr rmvb
  1055 +application/vnd.route66.link66+xml link66
  1056 +# application/vnd.rs-274x
  1057 +# application/vnd.ruckus.download
  1058 +# application/vnd.s3sms
  1059 +application/vnd.sailingtracker.track st
  1060 +# application/vnd.sbm.cid
  1061 +# application/vnd.sbm.mid2
  1062 +# application/vnd.scribus
  1063 +# application/vnd.sealed.3df
  1064 +# application/vnd.sealed.csf
  1065 +# application/vnd.sealed.doc
  1066 +# application/vnd.sealed.eml
  1067 +# application/vnd.sealed.mht
  1068 +# application/vnd.sealed.net
  1069 +# application/vnd.sealed.ppt
  1070 +# application/vnd.sealed.tiff
  1071 +# application/vnd.sealed.xls
  1072 +# application/vnd.sealedmedia.softseal.html
  1073 +# application/vnd.sealedmedia.softseal.pdf
  1074 +application/vnd.seemail see
  1075 +application/vnd.sema sema
  1076 +application/vnd.semd semd
  1077 +application/vnd.semf semf
  1078 +application/vnd.shana.informed.formdata ifm
  1079 +application/vnd.shana.informed.formtemplate itp
  1080 +application/vnd.shana.informed.interchange iif
  1081 +application/vnd.shana.informed.package ipk
  1082 +application/vnd.simtech-mindmapper twd twds
  1083 +# application/vnd.siren+json
  1084 +application/vnd.smaf mmf
  1085 +# application/vnd.smart.notebook
  1086 +application/vnd.smart.teacher teacher
  1087 +# application/vnd.software602.filler.form+xml
  1088 +# application/vnd.software602.filler.form-xml-zip
  1089 +application/vnd.solent.sdkm+xml sdkm sdkd
  1090 +application/vnd.spotfire.dxp dxp
  1091 +application/vnd.spotfire.sfs sfs
  1092 +# application/vnd.sss-cod
  1093 +# application/vnd.sss-dtf
  1094 +# application/vnd.sss-ntf
  1095 +application/vnd.stardivision.calc sdc
  1096 +application/vnd.stardivision.draw sda
  1097 +application/vnd.stardivision.impress sdd
  1098 +application/vnd.stardivision.math smf
  1099 +application/vnd.stardivision.writer sdw vor
  1100 +application/vnd.stardivision.writer-global sgl
  1101 +application/vnd.stepmania.package smzip
  1102 +application/vnd.stepmania.stepchart sm
  1103 +# application/vnd.street-stream
  1104 +# application/vnd.sun.wadl+xml
  1105 +application/vnd.sun.xml.calc sxc
  1106 +application/vnd.sun.xml.calc.template stc
  1107 +application/vnd.sun.xml.draw sxd
  1108 +application/vnd.sun.xml.draw.template std
  1109 +application/vnd.sun.xml.impress sxi
  1110 +application/vnd.sun.xml.impress.template sti
  1111 +application/vnd.sun.xml.math sxm
  1112 +application/vnd.sun.xml.writer sxw
  1113 +application/vnd.sun.xml.writer.global sxg
  1114 +application/vnd.sun.xml.writer.template stw
  1115 +application/vnd.sus-calendar sus susp
  1116 +application/vnd.svd svd
  1117 +# application/vnd.swiftview-ics
  1118 +application/vnd.symbian.install sis sisx
  1119 +application/vnd.syncml+xml xsm
  1120 +application/vnd.syncml.dm+wbxml bdm
  1121 +application/vnd.syncml.dm+xml xdm
  1122 +# application/vnd.syncml.dm.notification
  1123 +# application/vnd.syncml.dmddf+wbxml
  1124 +# application/vnd.syncml.dmddf+xml
  1125 +# application/vnd.syncml.dmtnds+wbxml
  1126 +# application/vnd.syncml.dmtnds+xml
  1127 +# application/vnd.syncml.ds.notification
  1128 +application/vnd.tao.intent-module-archive tao
  1129 +application/vnd.tcpdump.pcap pcap cap dmp
  1130 +# application/vnd.tmd.mediaflex.api+xml
  1131 +# application/vnd.tml
  1132 +application/vnd.tmobile-livetv tmo
  1133 +application/vnd.trid.tpt tpt
  1134 +application/vnd.triscape.mxs mxs
  1135 +application/vnd.trueapp tra
  1136 +# application/vnd.truedoc
  1137 +# application/vnd.ubisoft.webplayer
  1138 +application/vnd.ufdl ufd ufdl
  1139 +application/vnd.uiq.theme utz
  1140 +application/vnd.umajin umj
  1141 +application/vnd.unity unityweb
  1142 +application/vnd.uoml+xml uoml
  1143 +# application/vnd.uplanet.alert
  1144 +# application/vnd.uplanet.alert-wbxml
  1145 +# application/vnd.uplanet.bearer-choice
  1146 +# application/vnd.uplanet.bearer-choice-wbxml
  1147 +# application/vnd.uplanet.cacheop
  1148 +# application/vnd.uplanet.cacheop-wbxml
  1149 +# application/vnd.uplanet.channel
  1150 +# application/vnd.uplanet.channel-wbxml
  1151 +# application/vnd.uplanet.list
  1152 +# application/vnd.uplanet.list-wbxml
  1153 +# application/vnd.uplanet.listcmd
  1154 +# application/vnd.uplanet.listcmd-wbxml
  1155 +# application/vnd.uplanet.signal
  1156 +# application/vnd.uri-map
  1157 +# application/vnd.valve.source.material
  1158 +application/vnd.vcx vcx
  1159 +# application/vnd.vd-study
  1160 +# application/vnd.vectorworks
  1161 +# application/vnd.vel+json
  1162 +# application/vnd.verimatrix.vcas
  1163 +# application/vnd.vidsoft.vidconference
  1164 +application/vnd.visio vsd vst vss vsw
  1165 +application/vnd.visionary vis
  1166 +# application/vnd.vividence.scriptfile
  1167 +application/vnd.vsf vsf
  1168 +# application/vnd.wap.sic
  1169 +# application/vnd.wap.slc
  1170 +application/vnd.wap.wbxml wbxml
  1171 +application/vnd.wap.wmlc wmlc
  1172 +application/vnd.wap.wmlscriptc wmlsc
  1173 +application/vnd.webturbo wtb
  1174 +# application/vnd.wfa.p2p
  1175 +# application/vnd.wfa.wsc
  1176 +# application/vnd.windows.devicepairing
  1177 +# application/vnd.wmc
  1178 +# application/vnd.wmf.bootstrap
  1179 +# application/vnd.wolfram.mathematica
  1180 +# application/vnd.wolfram.mathematica.package
  1181 +application/vnd.wolfram.player nbp
  1182 +application/vnd.wordperfect wpd
  1183 +application/vnd.wqd wqd
  1184 +# application/vnd.wrq-hp3000-labelled
  1185 +application/vnd.wt.stf stf
  1186 +# application/vnd.wv.csp+wbxml
  1187 +# application/vnd.wv.csp+xml
  1188 +# application/vnd.wv.ssp+xml
  1189 +# application/vnd.xacml+json
  1190 +application/vnd.xara xar
  1191 +application/vnd.xfdl xfdl
  1192 +# application/vnd.xfdl.webform
  1193 +# application/vnd.xmi+xml
  1194 +# application/vnd.xmpie.cpkg
  1195 +# application/vnd.xmpie.dpkg
  1196 +# application/vnd.xmpie.plan
  1197 +# application/vnd.xmpie.ppkg
  1198 +# application/vnd.xmpie.xlim
  1199 +application/vnd.yamaha.hv-dic hvd
  1200 +application/vnd.yamaha.hv-script hvs
  1201 +application/vnd.yamaha.hv-voice hvp
  1202 +application/vnd.yamaha.openscoreformat osf
  1203 +application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg
  1204 +# application/vnd.yamaha.remote-setup
  1205 +application/vnd.yamaha.smaf-audio saf
  1206 +application/vnd.yamaha.smaf-phrase spf
  1207 +# application/vnd.yamaha.through-ngn
  1208 +# application/vnd.yamaha.tunnel-udpencap
  1209 +# application/vnd.yaoweme
  1210 +application/vnd.yellowriver-custom-menu cmp
  1211 +application/vnd.zul zir zirz
  1212 +application/vnd.zzazz.deck+xml zaz
  1213 +application/voicexml+xml vxml
  1214 +# application/vq-rtcpxr
  1215 +# application/watcherinfo+xml
  1216 +# application/whoispp-query
  1217 +# application/whoispp-response
  1218 +application/widget wgt
  1219 +application/winhlp hlp
  1220 +# application/wita
  1221 +# application/wordperfect5.1
  1222 +application/wsdl+xml wsdl
  1223 +application/wspolicy+xml wspolicy
  1224 +application/x-7z-compressed 7z
  1225 +application/x-abiword abw
  1226 +application/x-ace-compressed ace
  1227 +# application/x-amf
  1228 +application/x-apple-diskimage dmg
  1229 +application/x-authorware-bin aab x32 u32 vox
  1230 +application/x-authorware-map aam
  1231 +application/x-authorware-seg aas
  1232 +application/x-bcpio bcpio
  1233 +application/x-bittorrent torrent
  1234 +application/x-blorb blb blorb
  1235 +application/x-bzip bz
  1236 +application/x-bzip2 bz2 boz
  1237 +application/x-cbr cbr cba cbt cbz cb7
  1238 +application/x-cdlink vcd
  1239 +application/x-cfs-compressed cfs
  1240 +application/x-chat chat
  1241 +application/x-chess-pgn pgn
  1242 +# application/x-compress
  1243 +application/x-conference nsc
  1244 +application/x-cpio cpio
  1245 +application/x-csh csh
  1246 +application/x-debian-package deb udeb
  1247 +application/x-dgc-compressed dgc
  1248 +application/x-director dir dcr dxr cst cct cxt w3d fgd swa
  1249 +application/x-doom wad
  1250 +application/x-dtbncx+xml ncx
  1251 +application/x-dtbook+xml dtb
  1252 +application/x-dtbresource+xml res
  1253 +application/x-dvi dvi
  1254 +application/x-envoy evy
  1255 +application/x-eva eva
  1256 +application/x-font-bdf bdf
  1257 +# application/x-font-dos
  1258 +# application/x-font-framemaker
  1259 +application/x-font-ghostscript gsf
  1260 +# application/x-font-libgrx
  1261 +application/x-font-linux-psf psf
  1262 +application/x-font-pcf pcf
  1263 +application/x-font-snf snf
  1264 +# application/x-font-speedo
  1265 +# application/x-font-sunos-news
  1266 +application/x-font-type1 pfa pfb pfm afm
  1267 +# application/x-font-vfont
  1268 +application/x-freearc arc
  1269 +application/x-futuresplash spl
  1270 +application/x-gca-compressed gca
  1271 +application/x-glulx ulx
  1272 +application/x-gnumeric gnumeric
  1273 +application/x-gramps-xml gramps
  1274 +application/x-gtar gtar
  1275 +# application/x-gzip
  1276 +application/x-hdf hdf
  1277 +application/x-install-instructions install
  1278 +application/x-iso9660-image iso
  1279 +application/x-java-jnlp-file jnlp
  1280 +application/x-latex latex
  1281 +application/x-lzh-compressed lzh lha
  1282 +application/x-mie mie
  1283 +application/x-mobipocket-ebook prc mobi
  1284 +application/x-ms-application application
  1285 +application/x-ms-shortcut lnk
  1286 +application/x-ms-wmd wmd
  1287 +application/x-ms-wmz wmz
  1288 +application/x-ms-xbap xbap
  1289 +application/x-msaccess mdb
  1290 +application/x-msbinder obd
  1291 +application/x-mscardfile crd
  1292 +application/x-msclip clp
  1293 +application/x-msdownload exe dll com bat msi
  1294 +application/x-msmediaview mvb m13 m14
  1295 +application/x-msmetafile wmf wmz emf emz
  1296 +application/x-msmoney mny
  1297 +application/x-mspublisher pub
  1298 +application/x-msschedule scd
  1299 +application/x-msterminal trm
  1300 +application/x-mswrite wri
  1301 +application/x-netcdf nc cdf
  1302 +application/x-nzb nzb
  1303 +application/x-pkcs12 p12 pfx
  1304 +application/x-pkcs7-certificates p7b spc
  1305 +application/x-pkcs7-certreqresp p7r
  1306 +application/x-rar-compressed rar
  1307 +application/x-research-info-systems ris
  1308 +application/x-sh sh
  1309 +application/x-shar shar
  1310 +application/x-shockwave-flash swf
  1311 +application/x-silverlight-app xap
  1312 +application/x-sql sql
  1313 +application/x-stuffit sit
  1314 +application/x-stuffitx sitx
  1315 +application/x-subrip srt
  1316 +application/x-sv4cpio sv4cpio
  1317 +application/x-sv4crc sv4crc
  1318 +application/x-t3vm-image t3
  1319 +application/x-tads gam
  1320 +application/x-tar tar
  1321 +application/x-tcl tcl
  1322 +application/x-tex tex
  1323 +application/x-tex-tfm tfm
  1324 +application/x-texinfo texinfo texi
  1325 +application/x-tgif obj
  1326 +application/x-ustar ustar
  1327 +application/x-wais-source src
  1328 +# application/x-www-form-urlencoded
  1329 +application/x-x509-ca-cert der crt
  1330 +application/x-xfig fig
  1331 +application/x-xliff+xml xlf
  1332 +application/x-xpinstall xpi
  1333 +application/x-xz xz
  1334 +application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8
  1335 +# application/x400-bp
  1336 +# application/xacml+xml
  1337 +application/xaml+xml xaml
  1338 +# application/xcap-att+xml
  1339 +# application/xcap-caps+xml
  1340 +application/xcap-diff+xml xdf
  1341 +# application/xcap-el+xml
  1342 +# application/xcap-error+xml
  1343 +# application/xcap-ns+xml
  1344 +# application/xcon-conference-info+xml
  1345 +# application/xcon-conference-info-diff+xml
  1346 +application/xenc+xml xenc
  1347 +application/xhtml+xml xhtml xht
  1348 +# application/xhtml-voice+xml
  1349 +application/xml xml xsl
  1350 +application/xml-dtd dtd
  1351 +# application/xml-external-parsed-entity
  1352 +# application/xml-patch+xml
  1353 +# application/xmpp+xml
  1354 +application/xop+xml xop
  1355 +application/xproc+xml xpl
  1356 +application/xslt+xml xslt
  1357 +application/xspf+xml xspf
  1358 +application/xv+xml mxml xhvml xvml xvm
  1359 +application/yang yang
  1360 +application/yin+xml yin
  1361 +application/zip zip
  1362 +# application/zlib
  1363 +# audio/1d-interleaved-parityfec
  1364 +# audio/32kadpcm
  1365 +# audio/3gpp
  1366 +# audio/3gpp2
  1367 +# audio/ac3
  1368 +audio/adpcm adp
  1369 +# audio/amr
  1370 +# audio/amr-wb
  1371 +# audio/amr-wb+
  1372 +# audio/aptx
  1373 +# audio/asc
  1374 +# audio/atrac-advanced-lossless
  1375 +# audio/atrac-x
  1376 +# audio/atrac3
  1377 +audio/basic au snd
  1378 +# audio/bv16
  1379 +# audio/bv32
  1380 +# audio/clearmode
  1381 +# audio/cn
  1382 +# audio/dat12
  1383 +# audio/dls
  1384 +# audio/dsr-es201108
  1385 +# audio/dsr-es202050
  1386 +# audio/dsr-es202211
  1387 +# audio/dsr-es202212
  1388 +# audio/dv
  1389 +# audio/dvi4
  1390 +# audio/eac3
  1391 +# audio/encaprtp
  1392 +# audio/evrc
  1393 +# audio/evrc-qcp
  1394 +# audio/evrc0
  1395 +# audio/evrc1
  1396 +# audio/evrcb
  1397 +# audio/evrcb0
  1398 +# audio/evrcb1
  1399 +# audio/evrcnw
  1400 +# audio/evrcnw0
  1401 +# audio/evrcnw1
  1402 +# audio/evrcwb
  1403 +# audio/evrcwb0
  1404 +# audio/evrcwb1
  1405 +# audio/evs
  1406 +# audio/example
  1407 +# audio/fwdred
  1408 +# audio/g711-0
  1409 +# audio/g719
  1410 +# audio/g722
  1411 +# audio/g7221
  1412 +# audio/g723
  1413 +# audio/g726-16
  1414 +# audio/g726-24
  1415 +# audio/g726-32
  1416 +# audio/g726-40
  1417 +# audio/g728
  1418 +# audio/g729
  1419 +# audio/g7291
  1420 +# audio/g729d
  1421 +# audio/g729e
  1422 +# audio/gsm
  1423 +# audio/gsm-efr
  1424 +# audio/gsm-hr-08
  1425 +# audio/ilbc
  1426 +# audio/ip-mr_v2.5
  1427 +# audio/isac
  1428 +# audio/l16
  1429 +# audio/l20
  1430 +# audio/l24
  1431 +# audio/l8
  1432 +# audio/lpc
  1433 +audio/midi mid midi kar rmi
  1434 +# audio/mobile-xmf
  1435 +audio/mp4 m4a mp4a
  1436 +# audio/mp4a-latm
  1437 +# audio/mpa
  1438 +# audio/mpa-robust
  1439 +audio/mpeg mpga mp2 mp2a mp3 m2a m3a
  1440 +# audio/mpeg4-generic
  1441 +# audio/musepack
  1442 +audio/ogg oga ogg spx opus
  1443 +# audio/opus
  1444 +# audio/parityfec
  1445 +# audio/pcma
  1446 +# audio/pcma-wb
  1447 +# audio/pcmu
  1448 +# audio/pcmu-wb
  1449 +# audio/prs.sid
  1450 +# audio/qcelp
  1451 +# audio/raptorfec
  1452 +# audio/red
  1453 +# audio/rtp-enc-aescm128
  1454 +# audio/rtp-midi
  1455 +# audio/rtploopback
  1456 +# audio/rtx
  1457 +audio/s3m s3m
  1458 +audio/silk sil
  1459 +# audio/smv
  1460 +# audio/smv-qcp
  1461 +# audio/smv0
  1462 +# audio/sp-midi
  1463 +# audio/speex
  1464 +# audio/t140c
  1465 +# audio/t38
  1466 +# audio/telephone-event
  1467 +# audio/tone
  1468 +# audio/uemclip
  1469 +# audio/ulpfec
  1470 +# audio/vdvi
  1471 +# audio/vmr-wb
  1472 +# audio/vnd.3gpp.iufp
  1473 +# audio/vnd.4sb
  1474 +# audio/vnd.audiokoz
  1475 +# audio/vnd.celp
  1476 +# audio/vnd.cisco.nse
  1477 +# audio/vnd.cmles.radio-events
  1478 +# audio/vnd.cns.anp1
  1479 +# audio/vnd.cns.inf1
  1480 +audio/vnd.dece.audio uva uvva
  1481 +audio/vnd.digital-winds eol
  1482 +# audio/vnd.dlna.adts
  1483 +# audio/vnd.dolby.heaac.1
  1484 +# audio/vnd.dolby.heaac.2
  1485 +# audio/vnd.dolby.mlp
  1486 +# audio/vnd.dolby.mps
  1487 +# audio/vnd.dolby.pl2
  1488 +# audio/vnd.dolby.pl2x
  1489 +# audio/vnd.dolby.pl2z
  1490 +# audio/vnd.dolby.pulse.1
  1491 +audio/vnd.dra dra
  1492 +audio/vnd.dts dts
  1493 +audio/vnd.dts.hd dtshd
  1494 +# audio/vnd.dvb.file
  1495 +# audio/vnd.everad.plj
  1496 +# audio/vnd.hns.audio
  1497 +audio/vnd.lucent.voice lvp
  1498 +audio/vnd.ms-playready.media.pya pya
  1499 +# audio/vnd.nokia.mobile-xmf
  1500 +# audio/vnd.nortel.vbk
  1501 +audio/vnd.nuera.ecelp4800 ecelp4800
  1502 +audio/vnd.nuera.ecelp7470 ecelp7470
  1503 +audio/vnd.nuera.ecelp9600 ecelp9600
  1504 +# audio/vnd.octel.sbc
  1505 +# audio/vnd.qcelp
  1506 +# audio/vnd.rhetorex.32kadpcm
  1507 +audio/vnd.rip rip
  1508 +# audio/vnd.sealedmedia.softseal.mpeg
  1509 +# audio/vnd.vmx.cvsd
  1510 +# audio/vorbis
  1511 +# audio/vorbis-config
  1512 +audio/webm weba
  1513 +audio/x-aac aac
  1514 +audio/x-aiff aif aiff aifc
  1515 +audio/x-caf caf
  1516 +audio/x-flac flac
  1517 +audio/x-matroska mka
  1518 +audio/x-mpegurl m3u
  1519 +audio/x-ms-wax wax
  1520 +audio/x-ms-wma wma
  1521 +audio/x-pn-realaudio ram ra
  1522 +audio/x-pn-realaudio-plugin rmp
  1523 +# audio/x-tta
  1524 +audio/x-wav wav
  1525 +audio/xm xm
  1526 +chemical/x-cdx cdx
  1527 +chemical/x-cif cif
  1528 +chemical/x-cmdf cmdf
  1529 +chemical/x-cml cml
  1530 +chemical/x-csml csml
  1531 +# chemical/x-pdb
  1532 +chemical/x-xyz xyz
  1533 +font/collection ttc
  1534 +font/otf otf
  1535 +# font/sfnt
  1536 +font/ttf ttf
  1537 +font/woff woff
  1538 +font/woff2 woff2
  1539 +image/bmp bmp
  1540 +image/cgm cgm
  1541 +# image/dicom-rle
  1542 +# image/emf
  1543 +# image/example
  1544 +# image/fits
  1545 +image/g3fax g3
  1546 +image/gif gif
  1547 +image/ief ief
  1548 +# image/jls
  1549 +# image/jp2
  1550 +image/jpeg jpeg jpg jpe
  1551 +# image/jpm
  1552 +# image/jpx
  1553 +image/ktx ktx
  1554 +# image/naplps
  1555 +image/png png
  1556 +image/prs.btif btif
  1557 +# image/prs.pti
  1558 +# image/pwg-raster
  1559 +image/sgi sgi
  1560 +image/svg+xml svg svgz
  1561 +# image/t38
  1562 +image/tiff tiff tif
  1563 +# image/tiff-fx
  1564 +image/vnd.adobe.photoshop psd
  1565 +# image/vnd.airzip.accelerator.azv
  1566 +# image/vnd.cns.inf2
  1567 +image/vnd.dece.graphic uvi uvvi uvg uvvg
  1568 +image/vnd.djvu djvu djv
  1569 +image/vnd.dvb.subtitle sub
  1570 +image/vnd.dwg dwg
  1571 +image/vnd.dxf dxf
  1572 +image/vnd.fastbidsheet fbs
  1573 +image/vnd.fpx fpx
  1574 +image/vnd.fst fst
  1575 +image/vnd.fujixerox.edmics-mmr mmr
  1576 +image/vnd.fujixerox.edmics-rlc rlc
  1577 +# image/vnd.globalgraphics.pgb
  1578 +# image/vnd.microsoft.icon
  1579 +# image/vnd.mix
  1580 +# image/vnd.mozilla.apng
  1581 +image/vnd.ms-modi mdi
  1582 +image/vnd.ms-photo wdp
  1583 +image/vnd.net-fpx npx
  1584 +# image/vnd.radiance
  1585 +# image/vnd.sealed.png
  1586 +# image/vnd.sealedmedia.softseal.gif
  1587 +# image/vnd.sealedmedia.softseal.jpg
  1588 +# image/vnd.svf
  1589 +# image/vnd.tencent.tap
  1590 +# image/vnd.valve.source.texture
  1591 +image/vnd.wap.wbmp wbmp
  1592 +image/vnd.xiff xif
  1593 +# image/vnd.zbrush.pcx
  1594 +image/webp webp
  1595 +# image/wmf
  1596 +image/x-3ds 3ds
  1597 +image/x-cmu-raster ras
  1598 +image/x-cmx cmx
  1599 +image/x-freehand fh fhc fh4 fh5 fh7
  1600 +image/x-icon ico
  1601 +image/x-mrsid-image sid
  1602 +image/x-pcx pcx
  1603 +image/x-pict pic pct
  1604 +image/x-portable-anymap pnm
  1605 +image/x-portable-bitmap pbm
  1606 +image/x-portable-graymap pgm
  1607 +image/x-portable-pixmap ppm
  1608 +image/x-rgb rgb
  1609 +image/x-tga tga
  1610 +image/x-xbitmap xbm
  1611 +image/x-xpixmap xpm
  1612 +image/x-xwindowdump xwd
  1613 +# message/cpim
  1614 +# message/delivery-status
  1615 +# message/disposition-notification
  1616 +# message/example
  1617 +# message/external-body
  1618 +# message/feedback-report
  1619 +# message/global
  1620 +# message/global-delivery-status
  1621 +# message/global-disposition-notification
  1622 +# message/global-headers
  1623 +# message/http
  1624 +# message/imdn+xml
  1625 +# message/news
  1626 +# message/partial
  1627 +message/rfc822 eml mime
  1628 +# message/s-http
  1629 +# message/sip
  1630 +# message/sipfrag
  1631 +# message/tracking-status
  1632 +# message/vnd.si.simp
  1633 +# message/vnd.wfa.wsc
  1634 +# model/example
  1635 +# model/gltf+json
  1636 +model/iges igs iges
  1637 +model/mesh msh mesh silo
  1638 +model/vnd.collada+xml dae
  1639 +model/vnd.dwf dwf
  1640 +# model/vnd.flatland.3dml
  1641 +model/vnd.gdl gdl
  1642 +# model/vnd.gs-gdl
  1643 +# model/vnd.gs.gdl
  1644 +model/vnd.gtw gtw
  1645 +# model/vnd.moml+xml
  1646 +model/vnd.mts mts
  1647 +# model/vnd.opengex
  1648 +# model/vnd.parasolid.transmit.binary
  1649 +# model/vnd.parasolid.transmit.text
  1650 +# model/vnd.rosette.annotated-data-model
  1651 +# model/vnd.valve.source.compiled-map
  1652 +model/vnd.vtu vtu
  1653 +model/vrml wrl vrml
  1654 +model/x3d+binary x3db x3dbz
  1655 +# model/x3d+fastinfoset
  1656 +model/x3d+vrml x3dv x3dvz
  1657 +model/x3d+xml x3d x3dz
  1658 +# model/x3d-vrml
  1659 +# multipart/alternative
  1660 +# multipart/appledouble
  1661 +# multipart/byteranges
  1662 +# multipart/digest
  1663 +# multipart/encrypted
  1664 +# multipart/example
  1665 +# multipart/form-data
  1666 +# multipart/header-set
  1667 +# multipart/mixed
  1668 +# multipart/parallel
  1669 +# multipart/related
  1670 +# multipart/report
  1671 +# multipart/signed
  1672 +# multipart/voice-message
  1673 +# multipart/x-mixed-replace
  1674 +# text/1d-interleaved-parityfec
  1675 +text/cache-manifest appcache
  1676 +text/calendar ics ifb
  1677 +text/css css
  1678 +text/csv csv
  1679 +# text/csv-schema
  1680 +# text/directory
  1681 +# text/dns
  1682 +# text/ecmascript
  1683 +# text/encaprtp
  1684 +# text/enriched
  1685 +# text/example
  1686 +# text/fwdred
  1687 +# text/grammar-ref-list
  1688 +text/html html htm
  1689 +text/javascript js mjs
  1690 +# text/jcr-cnd
  1691 +# text/markdown
  1692 +# text/mizar
  1693 +text/n3 n3
  1694 +# text/parameters
  1695 +# text/parityfec
  1696 +text/plain txt text conf def list log in
  1697 +# text/provenance-notation
  1698 +# text/prs.fallenstein.rst
  1699 +text/prs.lines.tag dsc
  1700 +# text/prs.prop.logic
  1701 +# text/raptorfec
  1702 +# text/red
  1703 +# text/rfc822-headers
  1704 +text/richtext rtx
  1705 +# text/rtf
  1706 +# text/rtp-enc-aescm128
  1707 +# text/rtploopback
  1708 +# text/rtx
  1709 +text/sgml sgml sgm
  1710 +# text/t140
  1711 +text/tab-separated-values tsv
  1712 +text/troff t tr roff man me ms
  1713 +text/turtle ttl
  1714 +# text/ulpfec
  1715 +text/uri-list uri uris urls
  1716 +text/vcard vcard
  1717 +# text/vnd.a
  1718 +# text/vnd.abc
  1719 +text/vnd.curl curl
  1720 +text/vnd.curl.dcurl dcurl
  1721 +text/vnd.curl.mcurl mcurl
  1722 +text/vnd.curl.scurl scurl
  1723 +# text/vnd.debian.copyright
  1724 +# text/vnd.dmclientscript
  1725 +text/vnd.dvb.subtitle sub
  1726 +# text/vnd.esmertec.theme-descriptor
  1727 +text/vnd.fly fly
  1728 +text/vnd.fmi.flexstor flx
  1729 +text/vnd.graphviz gv
  1730 +text/vnd.in3d.3dml 3dml
  1731 +text/vnd.in3d.spot spot
  1732 +# text/vnd.iptc.newsml
  1733 +# text/vnd.iptc.nitf
  1734 +# text/vnd.latex-z
  1735 +# text/vnd.motorola.reflex
  1736 +# text/vnd.ms-mediapackage
  1737 +# text/vnd.net2phone.commcenter.command
  1738 +# text/vnd.radisys.msml-basic-layout
  1739 +# text/vnd.si.uricatalogue
  1740 +text/vnd.sun.j2me.app-descriptor jad
  1741 +# text/vnd.trolltech.linguist
  1742 +# text/vnd.wap.si
  1743 +# text/vnd.wap.sl
  1744 +text/vnd.wap.wml wml
  1745 +text/vnd.wap.wmlscript wmls
  1746 +text/x-asm s asm
  1747 +text/x-c c cc cxx cpp h hh dic
  1748 +text/x-fortran f for f77 f90
  1749 +text/x-java-source java
  1750 +text/x-nfo nfo
  1751 +text/x-opml opml
  1752 +text/x-pascal p pas
  1753 +text/x-setext etx
  1754 +text/x-sfv sfv
  1755 +text/x-uuencode uu
  1756 +text/x-vcalendar vcs
  1757 +text/x-vcard vcf
  1758 +# text/xml
  1759 +# text/xml-external-parsed-entity
  1760 +# video/1d-interleaved-parityfec
  1761 +video/3gpp 3gp
  1762 +# video/3gpp-tt
  1763 +video/3gpp2 3g2
  1764 +# video/bmpeg
  1765 +# video/bt656
  1766 +# video/celb
  1767 +# video/dv
  1768 +# video/encaprtp
  1769 +# video/example
  1770 +video/h261 h261
  1771 +video/h263 h263
  1772 +# video/h263-1998
  1773 +# video/h263-2000
  1774 +video/h264 h264
  1775 +# video/h264-rcdo
  1776 +# video/h264-svc
  1777 +# video/h265
  1778 +# video/iso.segment
  1779 +video/jpeg jpgv
  1780 +# video/jpeg2000
  1781 +video/jpm jpm jpgm
  1782 +video/mj2 mj2 mjp2
  1783 +# video/mp1s
  1784 +# video/mp2p
  1785 +# video/mp2t
  1786 +video/mp4 mp4 mp4v mpg4
  1787 +# video/mp4v-es
  1788 +video/mpeg mpeg mpg mpe m1v m2v
  1789 +# video/mpeg4-generic
  1790 +# video/mpv
  1791 +# video/nv
  1792 +video/ogg ogv
  1793 +# video/parityfec
  1794 +# video/pointer
  1795 +video/quicktime qt mov
  1796 +# video/raptorfec
  1797 +# video/raw
  1798 +# video/rtp-enc-aescm128
  1799 +# video/rtploopback
  1800 +# video/rtx
  1801 +# video/smpte292m
  1802 +# video/ulpfec
  1803 +# video/vc1
  1804 +# video/vnd.cctv
  1805 +video/vnd.dece.hd uvh uvvh
  1806 +video/vnd.dece.mobile uvm uvvm
  1807 +# video/vnd.dece.mp4
  1808 +video/vnd.dece.pd uvp uvvp
  1809 +video/vnd.dece.sd uvs uvvs
  1810 +video/vnd.dece.video uvv uvvv
  1811 +# video/vnd.directv.mpeg
  1812 +# video/vnd.directv.mpeg-tts
  1813 +# video/vnd.dlna.mpeg-tts
  1814 +video/vnd.dvb.file dvb
  1815 +video/vnd.fvt fvt
  1816 +# video/vnd.hns.video
  1817 +# video/vnd.iptvforum.1dparityfec-1010
  1818 +# video/vnd.iptvforum.1dparityfec-2005
  1819 +# video/vnd.iptvforum.2dparityfec-1010
  1820 +# video/vnd.iptvforum.2dparityfec-2005
  1821 +# video/vnd.iptvforum.ttsavc
  1822 +# video/vnd.iptvforum.ttsmpeg2
  1823 +# video/vnd.motorola.video
  1824 +# video/vnd.motorola.videop
  1825 +video/vnd.mpegurl mxu m4u
  1826 +video/vnd.ms-playready.media.pyv pyv
  1827 +# video/vnd.nokia.interleaved-multimedia
  1828 +# video/vnd.nokia.videovoip
  1829 +# video/vnd.objectvideo
  1830 +# video/vnd.radgamettools.bink
  1831 +# video/vnd.radgamettools.smacker
  1832 +# video/vnd.sealed.mpeg1
  1833 +# video/vnd.sealed.mpeg4
  1834 +# video/vnd.sealed.swf
  1835 +# video/vnd.sealedmedia.softseal.mov
  1836 +video/vnd.uvvu.mp4 uvu uvvu
  1837 +video/vnd.vivo viv
  1838 +# video/vp8
  1839 +video/webm webm
  1840 +video/x-f4v f4v
  1841 +video/x-fli fli
  1842 +video/x-flv flv
  1843 +video/x-m4v m4v
  1844 +video/x-matroska mkv mk3d mks
  1845 +video/x-mng mng
  1846 +video/x-ms-asf asf asx
  1847 +video/x-ms-vob vob
  1848 +video/x-ms-wm wm
  1849 +video/x-ms-wmv wmv
  1850 +video/x-ms-wmx wmx
  1851 +video/x-ms-wvx wvx
  1852 +video/x-msvideo avi
  1853 +video/x-sgi-movie movie
  1854 +video/x-smv smv
  1855 +x-conference/x-cooltalk ice
@@ -100,3 +100,69 @@ function list_to_tree($list, $pk='id',$pid = 'pid',$child = '_child',$root=0, $e @@ -100,3 +100,69 @@ function list_to_tree($list, $pk='id',$pid = 'pid',$child = '_child',$root=0, $e
100 } 100 }
101 return $tree; 101 return $tree;
102 } 102 }
  103 +
  104 +
  105 +/**
  106 + * swoole 携程使用,在协程里面不要使用 laravel 的 cache 缓存 的redis驱动
  107 + * @return \Swoole\Coroutine\Redis
  108 + * @author:dc
  109 + * @time 2023/2/7 15:07
  110 + */
  111 +function swoole_redis():\Swoole\Coroutine\Redis {
  112 +
  113 + // 不能定义全局变量接搜。
  114 + $redis = new \Swoole\Coroutine\Redis();
  115 + $redis->connect(
  116 + env('REDIS_HOST','127.0.0.1'),
  117 + intval(env('REDIS_PORT',6379)),
  118 + true
  119 + );
  120 + // 密码
  121 + $password = env('REDIS_PASSWORD',null);
  122 + $password && $redis->auth($password);
  123 + // 用库4
  124 + $redis->select(4);
  125 +
  126 + return $redis;
  127 +
  128 +}
  129 +
  130 +/**
  131 + * 返回 lua 脚本 存在key就无法添加成功
  132 + * @param $key
  133 + * @param $val
  134 + * @param int $ttl
  135 + * @return array
  136 + * @author:dc
  137 + * @time 2023/2/7 16:24
  138 + */
  139 +function swoole_redis_add($key,$val,$ttl=-1):array {
  140 + return [
  141 + "return redis.call('exists',KEYS[1])<1 and redis.call('setex',KEYS[1],ARGV[2],ARGV[1])",
  142 + [$key, $val, $ttl],
  143 + 1
  144 + ];
  145 +}
  146 +
  147 +
  148 +
  149 +
  150 +
  151 +
  152 +
  153 +
  154 +
  155 +
  156 +
  157 +
  158 +
  159 +
  160 +
  161 +
  162 +
  163 +
  164 +
  165 +
  166 +
  167 +
  168 +