云中客

梦想有多大,就能走多远

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  138 随笔 :: 3 文章 :: 173 评论 :: 30万 阅读

SendGrid设置

  1. Sender作成-域名方式
  2. 配置成功之后
  3. API KEY取得

Postfix配置

  1. 安装
    sudo apt install postfix
  • 选择Internet Site格式
  • domain 配置,需要设置sendgrid认证的domain
  1. 配置/etc/postfix/main.cf
    以下内容添加
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587
  1. 配置/etc/postfix/sasl_passwd(没有时新规作成)
[smtp.sendgrid.net]:587 apikey:yourSendGridApiKey
  • 更新文件
# root以外无权限
sudo chmod 600 /etc/postfix/sasl_passwd
# postfix使用更新
sudo postmap /etc/postfix/sasl_passwd
  1. 再启动
sudo systemctl restart postfix

其他问题

  • no mechanism available 问题需要安装如下包
apt-get install libsasl2-modules

posted on   走遍江湖  阅读(165)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 一文读懂知识蒸馏
· 终于写完轮子一部分:tcp代理 了,记录一下
点击右上角即可分享
微信分享提示

喜欢请打赏

扫描二维码打赏

支付宝打赏