AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[msmtp](server)

Martin Hope
user491241
Asked: 2020-06-05 15:14:20 +0800 CST

后缀 - 发送电子邮件时出错

  • 0

当我尝试使用 mutt(和 msmtp)发送电子邮件时,我收到以下错误:

msmtp: envelope from address [email protected] not accepted by the server
msmtp: server message: 530 5.7.0 Must issue a STARTTLS command first
msmtp: could not send mail (account qorg2 from /home/qorg/.msmtprc)

这是我的 postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
milter_default_action = accept
milter_protocol = 6
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
mydomain = vxempire.xyz
myhostname = vxempire.xyz
mynetworks = 127.0.0.0/8, 192.168.1.0/24
myorigin = vxempire.xyz
non_smtpd_milters = inet:localhost:12301
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_loglevel = 1
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP
smtpd_milters = inet:localhost:12301
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/vxempire.xyz-0002/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/vxempire.xyz-0002/privkey.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

有什么问题吗?

postfix msmtp
  • 1 个回答
  • 583 Views
Martin Hope
jcubic
Asked: 2020-02-15 04:22:29 +0800 CST

从 php 发送电子邮件时,来自 MAIL 命令中 docker 容器的 Postfix 非法地址语法

  • 0

我正在尝试使用来自 php的后缀图像和 msmtp 设置电子邮件。使用 msmtp 从命令行从 wordpress 容器到 postfix 发送电子邮件(我使用的是 docker compose,但我认为它不相关)。但是在php中它不起作用。

后缀日志显示:

Feb 14 12:00:09 36a1774df087 postfix/smtpd[141]: connect from volume_wordpress_1.volume_default[172.23.0.4]
Feb 14 12:00:09 36a1774df087 postfix/smtpd[141]: warning: Illegal address syntax from volume_wordpress_1.volume_default[172.23.0.4] in MAIL command: <[email protected]>
Feb 14 12:00:09 36a1774df087 postfix/smtpd[141]: disconnect from volume_wordpress_1.volume_default[172.23.0.4]
Feb 14 12:03:29 36a1774df087 postfix/anvil[143]: statistics: max connection rate 1/60s for (smtp:172.23.0.4) at Feb 14 11:58:44
Feb 14 12:03:29 36a1774df087 postfix/anvil[143]: statistics: max connection count 1 for (smtp:172.23.0.4) at Feb 14 11:58:44
Feb 14 12:03:29 36a1774df087 postfix/anvil[143]: statistics: max cache size 1 at Feb 14 11:58:44

php 配置如下所示:

sendmail_path = "/usr/bin/msmtp -C /etc/msmtprc -t -i"

当我从终端运行它时,相同的命令起作用。但是从php它显示上面的错误。

是否需要更改[email protected](是内网公用机器地址,wordpress是docker-compose.yml中的服务名称)?我怎样才能做到这一点?

postfix wordpress msmtp
  • 1 个回答
  • 353 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve