问题标签 [msmtp]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
420 浏览

php - 发送邮件路径错误?

我刚刚切换到使用 Msmpt,但无法使用 mail() 函数发送。我可以完美地通过 SSH 命令行发送,但 var_dump 显示邮件返回错误值。

是路径,但是手动浏览,找不到“msmtp”。任何想法如何找到它的位置,以便我能够更正 sendmail 路径?

0 投票
1 回答
2836 浏览

php - 如何使用 Amazon SES 配置 msmtp?

Amazon 有 postfix 和 sendmail 的说明,但没有msmtp(简单的 SMTP 客户端),所以在这里添加它们。

0 投票
2 回答
3625 浏览

security - msmtp and smtp account password - how to obfuscate

I configured msmtp with my gmail account. I obviously want to avoid writing my password in plaintext format in the config file. Luckily enough msmtp offer the option passwordeval which can be used to obtain the password from the output of an an executable.

The question is: how should I use it?

I found here the following suggestion: passwordeval gpg -d /some/path/to/.msmtp.password.gpg

That doesn't make much sense to me: if someone is able to access my config file he will certainly manage to run such a command and obtain the password from gpg.

So I believe I'm left with the only option of obfuscating the password within the binary executable even if I read almost everywhere that this is bad!

My impossible-to-hack implementation is: if the sendmail process is running output the correct pass, otherwise give a fake pass.

Your suggestions? Other (more secure) tricks different from storing the pass in the binary file?

0 投票
2 回答
4637 浏览

ubuntu - crontab 使用 msmtp 发送邮件失败

当 crontab 出现一些错误时,我想使用 msmtp 而不是 postfix 发送邮件,但我失败了。

我的操作系统是 ubuntu 12.04

这是我的步骤:

然后我编辑/etc/msmtprc文件以配置 smtp 服务器:

然后我测试了msmtp,就OK了

msmtp -Sd

下一步是修改/etc/aliases

我可以使用 msmtp 发送我的电子邮件。

但在 中/var/log/cron.log,出现错误:

怎么了 ?如何解决问题?谁能帮我一把?

0 投票
1 回答
823 浏览

configuration - 无法使用 Google 帐户接收带有 msmtp 的电子邮件

我在备份服务器 (OpenSUSE 12.2) 上遇到了 msmtp 问题。每次我的一些备份失败时,我都会尝试发送电子邮件。出于这个原因,我想使用 msmtp。我已经设置好了一切。但是,即使我在 Gmail 的“已发送”和“收件箱”文件夹中看到已发送的项目,我也从未在我想要的电子邮件帐户上收到一封电子邮件。有人可以帮我吗?脚本如下。请查看收件人是我在日志中的 gmail acc,即使 text.txt 中的内容不同。

.msmtprc

.msmtp

文本.txt

发送邮件命令

非常感谢所有愿意帮助我的人。大卫

0 投票
2 回答
1861 浏览

php - 我如何配置 Msmtp 以使用 gmail SMTP

我尝试在服务器上安装一个与 Gmail SMTP 配合使用的 msmtp。

我的 .msmtprc 文件:

我的 php.ini 文件有这一行:

命令 :

完美工作并发送邮件

似乎工作,但我从来没有收到邮件

任何人都可以帮我配置 Msmtp 以使用 Gmail 作为 SMTP 中继请

0 投票
1 回答
3685 浏览

php - PHP - 553 Zoho mail 和 MyBB 不允许中继

我正在尝试使用 Zoho 的 SMTP 服务器从 MyBB 安装发送注册电子邮件。但是,电子邮件永远不会发送,当我检查日志时,我注意到错误是。

某些部分被遮盖以隐藏私人信息!

这是在 php.ini 中设置的 sendmail 路径

某些部分被遮盖以隐藏私人信息!

这是 MSMTP 的 myserver 配置

某些部分被遮盖以隐藏私人信息!

问题是我知道它正在工作并且没有端口被阻止,因为当我在命令行中使用相同的命令时。电子邮件已成功发送和接收。

某些部分被遮盖以隐藏私人信息!

这意味着要么是 MyBB 发送电子邮件的方式有问题,要么是我在 php.ini 文件中设置的 PHP 配置或命令行有问题。

我已经搜索了一整天,但我得到的每个结果要么与 PHP 无关,要么从一开始就没有用。我的是从命令行工作,而不是从 PHP 工作。

我在服务器上使用 UFW,每个端口都完全打开,所以我猜它与阻塞的端口无关。

它适用于 Gmail,但每封电子邮件都被发送到垃圾邮件文件夹,而且并非每次都适用于每封电子邮件。

编辑:我尝试使用 PHP5-CLI 发送电子邮件并且它有效。所以我猜这可能是 PHP5-FPM 或 MyBB 有问题。

0 投票
6 回答
12028 浏览

php - linux msmtp 配置从 shell 发送,但从 PHP/apache 失败

linux(fedora 20)msmtp配置从shell发送但从PHP / apache失败,我很难过......我的目标只是通过我的本地开发网络服务器的gmail smtp发送电子邮件,以测试发送邮件的代码输出

php.ini sendmail 文件读取: sendmail_path = /usr/bin/msmtp --debug -C /etc/msmtprc --read-recipients

系统上只有一个 php.ini,用于 CLI 和位于 /etc/php.ini 的 web 服务器

/etc/msmtprc 的权限设置为 apache:apache 600

以下命令作为 root 工作并生成测试电子邮件:

  • php -r "mail('emily@emilytinch.net', '最新测试电子邮件', '测试电子邮件正文');"
  • runuser -l apache -c '/usr/bin/msmtp --debug -C /etc/msmtprc --read-recipients < /var/www/html/test.mail' (test.mail 包括往返行)

但是当从以下脚本调用 php 邮件函数时 apache/php 会产生错误:

错误期间的日志文件如下所示:

  • /var/log/httpd/error_log:msmtp:无法连接到 smtp.gmail.com,端口 587:权限被拒绝 msmtp:无法发送邮件(帐户默认来自 /etc/msmtprc)

/etc/msmtprc 包含:

欢迎任何指向正确方向的指针...仅尝试实现 localhost php 邮件功能通过我的 gmail smtp 服务器发送电子邮件的简单途径 - 这不是生产服务器配置,它是我的本地 apache/php 网络服务器发展

0 投票
1 回答
4151 浏览

linux - Yum 没有安装 msmtp

我正在尝试在我的服务器 CentOS 6.6 上安装 msmtp。但 yum 说找不到包裹。我使用 CentOS 安装附带的 yum 的默认配置。我该如何解决?

0 投票
0 回答
391 浏览

email - Emacs 邮件模式复制发送的消息

在邮件模式 ( C-x m) 中,如何获取保存在 IMAP 已发送文件夹中的已发送邮件的副本?我msmtp用来发送邮件。我安装了 Arch Linuxmsmtp-mta软件包,以便它可以使用该sendmail命令作为msmtp. 在我的init.el我有(setq mail-user-agent 'sendmail-user-agent). 我不确定是否需要在我的邮件服务器上配置 Emacs 或其他东西才能保存已发送邮件的副本。