duanliaouu965826 2015-11-25 01:22
浏览 48

Postfix,MediaWiki,LAMP,Server不会发送电子邮件

I'm not sure if the issue with with Postfix, MediaWiki, LAMP or what. Basically I configured an extension for MediaWiki for AccountRequest and it's supposed to send an email out to the user that created to give them login information. Emails aren't sent out. I figured it might be something to do with settings in localsettings.php but when I add the $wgSMTP array listed below but with my info I start getting [3b2f8024] 2015-11-24 20:19:31: Fatal exception of type "MWException" showing up on 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)
);

If I leave the localsettings.php settings as enabled and all that it will act like it works but users never get the email.

$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;

Wondering of a good workaround for this or if someone can point me in the right direction to get this fixed that would be awesome. I've spent hours googling without any results. If my question isn't clear or you need more information please just ask.

  • 写回答

1条回答 默认 最新

  • 普通网友 2016-02-13 10:01
    关注

    Check that the SMTP server is actually reachable. With your $wgSMTP settings, do:

    telnet mail.example.com 25
    

    and see if you can connect. If not, either there is no SMTP server running there or there is a firewall. Double check the SMTP host and port, check instructions on how to open firewall in your distribution.

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法