1

我们已经安装了wikibase-docker,前面有一个 Apache 服务器来处理 SSL 并将两个虚拟主机代理到 Docker 的端口。

当我使用 PasswordReset 功能时,它应该发送一封电子邮件。但仅sh: 1: -t: not found由 wikibase 容器记录。

4

1 回答 1

1

经过一番搜索,我找到了可以添加到 wikibase 容器中 LocalSettings.php的 MediaWiki 配置选项$wgSMTP 。

$wgSMTP = [
    'host'     => 'mail.example.com', // could also be an IP address. Where the SMTP server is located
    'IDHost'   => 'example.com',      // Generally this will be the domain name of your website (aka mywiki.org)
    'port'     => 25,                 // Port to use when connecting to the SMTP server
    'auth'     => true,               // Should we use SMTP authentication (true or false)
    'username' => 'my_user_name',     // Username to use for SMTP authentication (if being used)
    'password' => 'my_password'       // Password to use for SMTP authentication (if being used)
];
docker cp wikibase-docker_wikibase_1:/var/www/html/w/LocalSettings.php LocalSettings.php
edit LocalSettings.php
docker cp LocalSettings.php wikibase-docker_wikibase_1:/var/www/html/w/LocalSettings.php
于 2020-08-13T07:20:29.763 回答