Gitlab SMTP发送邮件报错 Net OpenTimeout execution expired

Gitlab SMTP发送邮件报错:

Net::OpenTimeout: execution expired

查看Gitlab发送邮件日志:

# tail -f log/sidekiq.log

原因:阿里云服务器默认是屏蔽25端口,采用SSL 465端口发送即可

SMTP远程服务器端口测试:

# telnet smtp.exmail.qq.com 25  //不通
Trying 163.177.72.143...
^C
# telnet smtp.exmail.qq.com 465  //通
Trying 163.177.72.143...
Connected to smtp.exmail.qq.com.
Escape character is '^]'.
^C
Connection closed by foreign host.
#
# sudo -u git -H vim config/initializers/smtp_settings.rb
# sudo -u git service gitlab restart
if Rails.env.production?
  Rails.application.config.action_mailer.delivery_method = :smtp

  ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.smtp_settings = {
    address: "smtp.exmail.qq.com",
    port: 465,
    ssl: true,
    user_name: "example@example.com",
    password: "123456",
    domain: "mail.example.com",
    authentication: :login,
    enable_starttls_auto: true,
    openssl_verify_mode: 'none'
    # openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options
  }
end
上一篇 SSH携带密码登录sshpass
下一篇 Gitlab报错 ActionView Template Error uninitialized constant ActionView CompiledTemplates EXPR_ARG
目录
文章列表
1 Shopify支付网关退款接入
Shopify支付网关退款接入
2
Spring Boot配置文件yml自定义数组或List集合
Spring Boot配置文件yml自定义数组或List集合
3
RSA加密、解密、签名、验签的原理及方法
RSA加密、解密、签名、验签的原理及方法
4
Android编译OpenSSL库报错ui_openssl.c:function read_string_inner
Android编译OpenSSL库报错ui_openssl.c:function read_string_inner
5
Android ViewBinding入门
Android ViewBinding入门
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。