git如何不提交后缀_GitLab后缀配置邮件不发送

如果您的ISP阻止端口25(这显然很频繁,对我来说也是如此),您可以使用Gmail作为中继.以下说明来自

here,并逐步介绍该过程:

在/etc/postfix/main.cf中添加:

# Relaying Postfix SMTP via GMAIL

relayhost = [smtp.gmail.com]:587

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

smtp_sasl_security_options = noanonymous

smtp_tls_CAfile = /etc/postfix/cacert.pem

smtp_use_tls = yes

然后,您需要设置Gmail凭据.对于这个打开/创建/ etc / postfix / sasl_passwd并写:

[smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD

你在哪里(你可能已经猜到了)USERNAME和PASSWORD是你的凭据.然后更改文件的权限:

$sudo chmod 400 /etc/postfix/sasl_passwd

$sudo postmap /etc/postfix/sasl_passwd

现在我们需要将证书添加到Postfix:

$cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem

只需重新启动postfix,你应该是好的:

$sudo service postfix restart

如果你想测试:

$echo "Hello World" | mail -s "Test Message" you@example.com

并检查邮件日志对它的看法:

$tail /var/log/mail.log

注意:每天只有500封电子邮件,使用Gmail的SMTP服务器作为中继.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值