【问题标题】:Postfix, MediaWiki, LAMP, Server won't send out emailsPostfix、MediaWiki、LAMP、Server 不会发送电子邮件
【发布时间】:2015-11-25 01:22:25
【问题描述】:

我不确定 Postfix、MediaWiki、LAMP 是否存在问题。基本上,我为 AccountRequest 配置了 MediaWiki 的扩展,它应该向创建的用户发送一封电子邮件,以向他们提供登录信息。电子邮件不会发送出去。我认为这可能与 localsettings.php 中的设置有关,但是当我添加下面列出的 $wgSMTP 数组但使用我的信息时,我开始收到 [3b2f8024] 2015-11-24 20:19:31: Fatal exception of type " MWException”出现在 mediawiki 上。

$wgSMTP = array(
'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)
);

如果我将 localsettings.php 设置保留为启用状态,并且所有这些设置都可以正常工作,但用户永远不会收到电子邮件。

$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO


$wgEmergencyContact = "apache@10.00.000.000";
$wgPasswordSender = "apache@10.00.000.000";

$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;

想知道一个很好的解决方法,或者是否有人可以指出我正确的方向来解决这个问题,那就太棒了。我花了几个小时谷歌搜索没有任何结果。如果我的问题不清楚或者您需要更多信息,请尽管提问。

【问题讨论】:

  • 你查看邮件日志了吗?
  • 不,我没有,所以我应该查看 postfix 的日志,看看它在做什么。
  • 对不起,这几天我太忙了。这是我从日志中得到的信息,这是任何发送的电子邮件,来自 cli 的测试电子邮件和 mediawiki 尝试发送的电子邮件。 B6D5ACA24BF:to=,relay=none,delay=225603,delays=225603/0.01/0/0,dsn=4.3.5,status=deferred(找不到主机或域名。名称服务错误对于 name=smtp.localdomain type=AAAA: Host not found) – 另外,如果我将 main.cf 更改为仅使用 ipv4 只是将 dns 类型更改为 A 并且仍然不起作用。
  • 如果我在 CLI 中运行主机 example@gmail.com 8.8.8.8 我也会收到连接超时消息。
  • 我认为这是由于工作中的代理,联系了正确的团队以解决这个问题。

标签: php apache2 mediawiki lamp


【解决方案1】:

检查SMTP server is actually reachable。使用您的 $wgSMTP 设置,请执行以下操作:

telnet mail.example.com 25

看看你是否可以连接。如果没有,要么那里没有运行 SMTP 服务器,要么有防火墙。仔细检查 SMTP 主机和端口,检查如何在您的发行版中打开防火墙的说明。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-19
    • 1970-01-01
    • 2011-07-29
    相关资源
    最近更新 更多