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 / 问题 / 990944
Accepted
Ror
Ror
Asked: 2019-11-08 02:30:59 +0800 CST2019-11-08 02:30:59 +0800 CST 2019-11-08 02:30:59 +0800 CST

msmtp 和 OVH 邮件

  • 772

当用户在 Debian 9 服务器上进行身份验证时,我想发送一封邮件。我使用 OVH 邮件服务器。我已经像这样设置了 msmtp:

account myaccount
tls_starttls off
logfile ~/.msmtp.log

host ssl0.ovh.net
port 465
from [email protected]
auth on
user [email protected]
password XXXXXXXXXXXXXXXX

account default : myaccount

我尝试发送邮件:

echo "Hello this is sending email using msmtp" | msmtp [email protected]

但是没有用,什么也没有发生。命令相同:

msmtp --serverinfo --tls --tls-certcheck=off --host ssl0.ovh.net --port 465

编辑 1

我在评论中尝试了@Anfi 提出的命令,我得到:

-bash: subject:: command not found
ignoring system configuration file /etc/msmtprc: No such file or directory
loaded user configuration file /home/myuser/.msmtprc
falling back to default account
using account default from /home/myuser/.msmtprc
host = ssl0.ovh.net
port = 465
proxy host = (not set)
proxy port = 0
timeout = off
protocol = smtp
domain = localhost
auth = choose
user = [email protected]
password = *
passwordeval = (not set)
ntlmdomain = (not set)
tls = off
tls_starttls = off
tls_trust_file = (not set)
tls_crl_file = (not set)
tls_fingerprint = (not set)
tls_key_file = (not set)
tls_cert_file = (not set)
tls_certcheck = on
tls_min_dh_prime_bits = (not set)
tls_priorities = (not set)
auto_from = off
maildomain = (not set)
from = [email protected]
add_missing_from_header = on
add_missing_date_header = on
remove_bcc_headers = on
dsn_notify = (not set)
dsn_return = (not set)
logfile = /home/myuser/.msmtp.log
syslog = (not set)
aliases = (not set)
reading recipients from the command line
msmtp: the server sent an empty reply 
msmtp: could not send mail (account default from /home/myuser/.msmtprc)
email
  • 2 2 个回答
  • 712 Views

2 个回答

  • Voted
  1. Best Answer
    Ror
    2019-11-08T03:29:51+08:002019-11-08T03:29:51+08:00

    好吧,我明白了。我需要将其添加到 conf 文件中:

    tls on
    tls_certcheck off
    

    邮件有效,但我得到

    <-- 250-AUTH LOGIN PLAIN
    

    不确定这是否真的安全

    • 0
  2. user960180
    2022-03-28T01:53:17+08:002022-03-28T01:53:17+08:00

    问题在tls_starttls.

    您必须禁用认证文件并设置

    account MyAccount
    tls on
    tls_certcheck off
    tls_starttls off
    host ssl0.ovh.net
    port 465
    from user@domain
    user user@domain
    password UserPassword
    # Set a default account
    account default : MyAccount
    
    • 0

相关问题

  • 如何绕过 ISP 的限制性电子邮件政策?

  • SharePoint 传入电子邮件出现“未知别名”错误

  • 电子邮件帐户的角色名称与人名

  • 如何在笔记本电脑上使用 Tobit David?[关闭]

  • 随行人员通过 VPN 连接到 Exchange 2007

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