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) {