From 2fa51b5c2d45583903975c33d7c060ed13f756b4 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Wed, 22 Sep 2021 21:38:46 -0700 Subject: [PATCH] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8DIMAP=E9=82=AE?= =?UTF-8?q?=E7=AE=B1=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F=E5=91=BD=E5=90=8D?= =?UTF-8?q?=20(#8212)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/install/README.md | 4 ++-- docs/install/README.md | 4 ++-- lib/routes/mail/imap.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index eb58b8c2a5..c2cb2052a9 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -519,8 +519,8 @@ See docs of specified route and `lib/config.js` for detail information. - mail: - `EMAIL_CONFIG_{email}`: Mail setting, replace `{email}` with the email account, replace `@` in email account with `.`, eg. `EMAIL_CONFIG_xxx.gmail.com`. The value is in the format of `password=password&host=server&port=port`, eg: - - Linux env: `EMAIL_CONFIG_xxx.qq.com="password=123456&host=imap.qq.com&port=993"` - - docker env: `EMAIL_CONFIG_xxx.qq.com=password=123456&host=imap.qq.com&port=993`, please do not include quotations `'`,`"` + - Linux env: `EMAIL_CONFIG_xxx_qq_com="password=123456&host=imap.qq.com&port=993"` + - docker env: `EMAIL_CONFIG_xxx_qq_com=password=123456&host=imap.qq.com&port=993`, please do not include quotations `'`,`"` - nhentai torrent: [Registration](https://nhentai.net/register/) diff --git a/docs/install/README.md b/docs/install/README.md index 1237195713..48b2b4fd0c 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -551,8 +551,8 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - 邮箱 邮件列表路由: - `EMAIL_CONFIG_{email}`: 邮箱设置,替换 `{email}` 为 邮箱账号,邮件账户的 `@` 替换为 `.`,例如 `EMAIL_CONFIG_xxx.qq.com`。Linux 内容格式为 `password=密码&host=服务器&port=端口`,docker 内容格式为 `password=密码\&host=服务器\&port=端口`,例如: - - Linux 环境变量:`EMAIL_CONFIG_xxx.qq.com="password=123456&host=imap.qq.com&port=993"` - - docker 环境变量:`EMAIL_CONFIG_xxx.qq.com=password=123456\&host=imap.qq.com\&port=993`,请勿添加引号 `'`,`"`。 + - Linux 环境变量:`EMAIL_CONFIG_xxx_qq_com="password=123456&host=imap.qq.com&port=993"` + - docker 环境变量:`EMAIL_CONFIG_xxx_qq_com=password=123456\&host=imap.qq.com\&port=993`,请勿添加引号 `'`,`"`。 - 吹牛部落 栏目更新 diff --git a/lib/routes/mail/imap.js b/lib/routes/mail/imap.js index 8b28eaede2..5fea80ce29 100644 --- a/lib/routes/mail/imap.js +++ b/lib/routes/mail/imap.js @@ -13,7 +13,7 @@ module.exports = async (ctx) => { host: '', port: 993, }, - queryString.parse(config.email.config[email.replace('@', '.')]) + queryString.parse(config.email.config[email.replace(/[@.]/g, '_')]) ); if (!mailConfig.username || !mailConfig.password || !mailConfig.host || !mailConfig.port) {