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
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[sendmail](ubuntu)

Martin Hope
chribonn
Asked: 2020-11-05 05:32:19 +0800 CST

msmtp: sendmail: account default not found: 没有可用的配置文件(系统范围的配置)

  • 7

我正在尝试使用 msmtp 作为系统配置来设置 Ubuntu 20.04。

我安装了 msmtp (v1.8.6-1) 和 heirloom-mailx (v12.5-2+deb7u1build0.14.04.1)。

配置文件/etc/msmtprc (chmod: 600) 有以下内容:

# Set default values for all accounts.
account default
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile        /var/log/msmtp

# gmail
host           smtp.gmail.com
port           587
from           <account>@gmail.com
user           <account>
password       <password>

# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL

日志文件/var/log/msmtp文件模式为 660。

文件/etc/mailrc (chmod: 600) 包含以下内容:

set sendmail="/usr/bin/msmtp"

当我尝试使用 sendmail 从终端发送电子邮件时,我收到以下sendmail: account default not found: no configuration file available。

如果我直接调用 msmtp,也会出现同样的错误。

smtp email sendmail 20.04
  • 1 个回答
  • 9353 Views
Martin Hope
Hack Saw
Asked: 2020-02-09 18:06:01 +0800 CST

cf/README 在哪里?应该是配置文件

  • 0

配置 sendmail 的主要文档位于 sendmail/cf/README 的文件中。出于某种原因,它不在我的 18.04 服务器上。

请注意,该文件在 sendmail/cf 目录中的其他文档中有所提及。

sendmail
  • 1 个回答
  • 88 Views
Martin Hope
user6266369
Asked: 2019-12-25 06:07:23 +0800 CST

在 Gmail 中使用 sendEmail

  • 1

我尝试通过 Gmail 和 sendEmail 发送电子邮件。我尝试了一些配置,但没有任何效果。


sendEmail \
-o tls=yes \
-f [email protected] \
-t [email protected] \
-s smtp.gmail.com:587 \
-xu [email protected] \
-xp some-safty-password \
-u Hello World \
-m This is an E-Mail text.

RESULT: sendEmail[11181]: ERROR => ERROR => SMTP-AUTH: Authentication to smtp.gmail.com:587 failed.


sendEmail \
-o tls=yes \
-f [email protected] \
-t [email protected] \
-s smtp.gmail.com:465 \
-xu [email protected] \
-xp some-safty-password \
-u Hello World \
-m This is an E-Mail text.

RESULT:  sendEmail[11213]: ERROR => smtp.gmail.com:465 returned a zero byte response to our query.

我尝试过使用和不使用 TLS。我已在 Gmail 帐户上激活 POP、IMAP 和 SMTP。

我的配置有什么问题?

email gmail sendmail
  • 1 个回答
  • 2585 Views
Martin Hope
ComputerScientist
Asked: 2018-12-08 17:13:46 +0800 CST

fail2ban.service 的作业失败,因为控制进程退出并出现错误

  • 1

我有一个关于在我的一台机器上启动 fail2ban 的基本问题。我今天有一台新安装的 Ubuntu 16.04 的机器,我正在遵循来自源代码的各种关于 fail2ban 的说明,例如this、this、this和this。(我正在关注几个来交叉引用每个,并且因为官方的fail2ban FAQ(我也在交叉引用,公平起见)似乎已经过时,因为它指的是fail2ban 0.8(并且没有有特定于 Ubuntu 的说明),而我有 0.9.3:

$ fail2ban-client --version
Fail2Ban v0.9.3

Copyright (c) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors
Copyright of modifications held by their respective authors.
Licensed under the GNU General Public License v2 (GPL).

Written by Cyril Jaquier <[email protected]>.
Many contributions by Yaroslav O. Halchenko <[email protected]>.

我通过安装fail2ban

sudo apt-get install fail2ban

还有 sendmail,它可能允许发送电子邮件。

$ sudo apt-get install sendmail
Reading package lists... Done
Building dependency tree       
Reading state information... Done
sendmail is already the newest version (8.15.2-3).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

按照上面指南中的说明,我将/etc/fail2ban/jail.conf文件复制到/etc/fail2ban/jail.local中,注释掉所有行,然后只在/etc/fail2ban/jail.local. (在下文中,我粘贴了 vim 中出现的行号,这可能有助于检查您是否有类似的 jail 文件。)

(1) 最大重试次数,我改成3次,所以在系统阻止用户ssh-ing之前应该有3次尝试失败。

 65 # # "maxretry" is the number of failures before a host get banned.
 66 maxretry = 3

(2) 和 (3):我更改了这两项,第一项是我的个人电子邮件(即[mypersonalemail]),另一项是计算机名称。我只是输入了“计算机名”——这里的电子邮件会更好吗?

129 destemail = [mypersonalemail]
130 
131 # # Sender email address used solely for some actions
132 sender = ComputerName

(4) 最后,我将动作更改为更具表现力的动作,因此它会发出电子邮件通知。

201 # # Choose default action.  To change, just override value of 'action' with the
202 # # interpolation to the chosen action shortcut (e.g.  action_mw, action_mwl, etc) in jail.local
203 # # globally (section [DEFAULT]) or per specific section
204 action = %(action_mwl)s

有了这个,下一步似乎是以某种方式启动服务。我对在这里获得花哨的正则表达式或定制监狱或摆弄 IP 表不感兴趣。在这一点上,我感兴趣的只是启动服务,并通过让我用故意错误的密码反复 ssh 进入机器来测试它。

不幸的是,当我尝试启动服务时,出现错误:

$ sudo service fail2ban start
Job for fail2ban.service failed because the control process exited with error code. See "systemctl status fail2ban.service" and "journalctl -xe" for details.

带输出(计算机名称是机器的名称):

$ systemctl status fail2ban.service
● fail2ban.service - Fail2Ban Service
   Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled)
   Active: failed (Result: start-limit-hit) since Fri 2018-12-07 17:03:55 PST; 29s ago
     Docs: man:fail2ban(1)
  Process: 21838 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255)
 Main PID: 6381 (code=killed, signal=TERM)
Dec 07 17:03:55 computer-name systemd[1]: Failed to start Fail2Ban Service.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Unit entered failed state.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Dec 07 17:03:55 computer-name systemd[1]: Stopped Fail2Ban Service.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Start request repeated too quickly.
Dec 07 17:03:55 computer-name systemd[1]: Failed to start Fail2Ban Service.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Unit entered failed state.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Failed with result 'start-limit-hit'.

和

$ journalctl -xe
Dec 07 17:03:55 computer-name systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Unit entered failed state.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Dec 07 17:03:55 computer-name systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has finished shutting down.
Dec 07 17:03:55 computer-name systemd[1]: Starting Fail2Ban Service...
-- Subject: Unit fail2ban.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has begun starting up.
Dec 07 17:03:55 computer-name fail2ban-client[21838]: ERROR  Failed during configuration: File contains no section headers.
Dec 07 17:03:55 computer-name fail2ban-client[21838]: file: '/etc/fail2ban/jail.local', line: 66
Dec 07 17:03:55 computer-name fail2ban-client[21838]: 'maxretry = 3\n'
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Control process exited, code=exited status=255
Dec 07 17:03:55 computer-name systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Unit entered failed state.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Failed with result 'exit-code'.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart.
Dec 07 17:03:55 computer-name systemd[1]: Stopped Fail2Ban Service.
-- Subject: Unit fail2ban.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has finished shutting down.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Start request repeated too quickly.
Dec 07 17:03:55 computer-name systemd[1]: Failed to start Fail2Ban Service.
-- Subject: Unit fail2ban.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit fail2ban.service has failed.
-- 
-- The result is failed.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Unit entered failed state.
Dec 07 17:03:55 computer-name systemd[1]: fail2ban.service: Failed with result 'start-limit-hit'.
Dec 07 17:04:32 computer-name org.gtk.vfs.Daemon[1529]: ** (process:3758): WARNING **: Couldn't create directory monitor on smb://x-gnome-

有人有什么建议吗?谢谢。

PS:有一些类似的问题:

  • 这似乎与 sendmail/postfix 有问题,但我已经安装了 sendmail,大概应该足够了吗?
  • 这个类似,但专注于 apache2,而我专注于 fail2ban,不关心 apache2。
ssh apache2 sendmail fail2ban
  • 1 个回答
  • 3861 Views
Martin Hope
Suhartiman
Asked: 2018-10-23 02:54:37 +0800 CST

基于 Sendmail 的错误

  • 0

从 Ubuntu 18.04 升级到 18.10 后,我的笔记本电脑出现错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up sendmail-base (8.15.2-11) ...
Saving current /etc/mail/sendmail.mc,cf to /var/backups
update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
update-inetd: warning: cannot add service, /etc/inetd.conf does not exist
update-inetd: error: --group is only relevant with --add
dpkg: error processing package sendmail-base (--configure):
 installed sendmail-base package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
 sendmail-base
E: Sub-process /usr/bin/dpkg returned an error code (1)
nocturnal@nocturnal-Linux:~$ 

如果我sudo-apt get upgrade在终端上写或任何方式。

任何人都可以帮助我吗?

upgrade sendmail
  • 2 个回答
  • 574 Views
Martin Hope
Eduardo Casillas Allen
Asked: 2018-06-04 20:03:24 +0800 CST

通过 bash 发送邮件过去可以工作,现在不再工作

  • 0

4 个月前,我制作了一个 .sh 脚本,每隔一段时间向自己发送我的 IP 地址,以便能够使用 ssh 远程连接到我的计算机。有几个月我没有使用它,因为我在家工作。我又要离开一段时间了,所以我会用它来连接我的台式电脑,只是,完全没有理由,当我运行脚本时,我不再收到邮件,即使脚本似乎像往常一样运行。我升级了 sendmail-bin 和 mailutils,根据我的记忆(以及回顾我制作脚本时的 bash 命令历史记录),我安装并使用了当时制作脚本的所有内容。

它很简单,基本上是一个 5 行脚本,它是这样的:

#!/bin/bash

echo "O.K."

while true
do
        ip="$(dig +short myip.opendns.com @resolver1.opendns.com)"
        echo "My WAN/Public IP address: ${ip}"
        echo $ip | mail -s "${ip}" [email protected]
        echo "sent"
        sleep 10800
done

当我运行它时,脚本会打印“已发送”,我故意将其放入终端以确认它已被发送。

me@myMacine:~$ ./ipsender.sh
O.K.
My WAN/Public IP address: 111.111.11.111
sent

我什至仍然在我的 gmail 垃圾邮件文件夹中保留了带有我的 IP 地址的电子邮件(我以前在我的垃圾邮件文件夹中获取它,这对我来说很好,现在我根本没有收到邮件),旧邮件在发送地址中有我自己计算机的用户名和名称作为域。我真的想不出我在做什么不同的事情,什么都没有;本质上它都是一样的,因此无法想出它不起作用的任何理由。我不再收到任何电子邮件,这就是我所知道的。我也试过 hotmail.com 地址。

我希望你们能帮助我理解为什么我没有收到电子邮件以及我可以做些什么来解决它。

另外我已经知道有一些方法可以使用我自己的 gmail 地址,使用其他包以及我的 gmail 帐户和密码等。我宁愿继续使用相同的方法并保持简单,再次,我没有理由改变它如果我知道它可以工作;简单就是我的剧本的全部内容。

谢谢你。

编辑 - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------

这是我通过运行得到的tail -f /var/log/maillog:

me@myComputer:~$ sudo tail -f /var/log/mail.log
Jun  4 03:05:10 myComputer sm-mta[9213]: w542YSqo007914: to=<me@myComputer>, delay=05:30:42, xdelay=00:00:00, mailer=local, pri=3000000, dsn=4.0.0, stat=Operating system error
Jun  4 03:05:10 myComputer sm-mta[9230]: w542Vs2b007865: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
Jun  4 03:05:10 myComputer sm-mta[9230]: w542Vs2b007865: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Jun  4 03:05:10 myComputer sm-mta[9213]: w542Vs2b007865: to=<me@myComputer>, delay=05:33:16, xdelay=00:00:00, mailer=local, pri=3090000, dsn=4.0.0, stat=Operating system error
Jun  4 03:05:10 myComputer sm-mta[9231]: w542JjVF007748: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
Jun  4 03:05:10 myComputer sm-mta[9231]: w542JjVF007748: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Jun  4 03:05:10 myComputer sm-mta[9213]: w542JjVF007748: to=<me@myComputer>, delay=05:45:25, xdelay=00:00:00, mailer=local, pri=3180000, dsn=4.0.0, stat=Operating system error
Jun  4 03:05:10 myComputer sm-mta[9232]: w542B0U6007560: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
Jun  4 03:05:10 myComputer sm-mta[9232]: w542B0U6007560: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Jun  4 03:05:10 myComputer sm-mta[9213]: w542B0U6007560: to=<me@myComputer>, delay=05:54:10, xdelay=00:00:00, mailer=local, pri=3270000, dsn=4.0.0, stat=Operating system error

这是我运行脚本 ( ./ipsender.sh) 后得到的结果:

Jun  4 03:11:09 myComputer sendmail[9292]: My unqualified host name (myComputer) unknown; sleeping for retry

这是一个很长的停顿,脚本将等待。完成邮件命令并从脚本打印“已发送”后,我在 mail.log 上得到了这个:

Jun  4 03:12:09 myComputer sendmail[9292]: unable to qualify my own domain name (myComputer) -- using short name
Jun  4 03:12:10 myComputer sendmail[9292]: w548C9EK009292: from=me@myComputer, size=134, class=0, nrcpts=1, msgid=<201806040812.w548C9EK009292@myComputer>, relay=me@localhost
Jun  4 03:12:10 myComputer sm-mta[9303]: w548CAhp009303: from=<me@myComputer>, size=383, class=0, nrcpts=1, msgid=<201806040812.w548C9EK009292@myComputer>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun  4 03:12:10 myComputer sendmail[9292]: w548C9EK009292: to=<[email protected]>, ctladdr=me@myComputer (1000/1000), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30134, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w548CAhp009303 Message accepted for delivery)
Jun  4 03:12:10 myComputer sm-mta[9305]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Jun  4 03:12:10 myComputer sm-mta[9305]: w548CAhp009303: to=<[email protected]>, ctladdr=<me@myComputer> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120383, relay=gmail-smtp-in.l.google.com. [74.125.198.26], dsn=5.0.0, stat=Service unavailable
Jun  4 03:12:10 myComputer sm-mta[9305]: w548CAhp009303: w548CAhp009305: DSN: Service unavailable
Jun  4 03:12:10 myComputer sm-mta[9307]: w548CAhp009305: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
Jun  4 03:12:10 myComputer sm-mta[9307]: w548CAhp009305: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Jun  4 03:12:10 myComputer sm-mta[9305]: w548CAhp009305: to=<me@myComputer>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=4.0.0, stat=Operating system error

编辑 - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------

安装后sensible-mda,输出tail -f /var/log/mail.log如下(仍然不会收到任何邮件):

casillas@DeepNoble:~$ sudo tail -f /var/log/mail.log
Jun  4 03:46:19 DeepNoble sm-mta[11230]: w548kJ5M011230: to=<casillas@DeepNoble>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Jun  4 03:47:14 DeepNoble sendmail[11253]: My unqualified host name (DeepNoble) unknown; sleeping for retry
Jun  4 03:48:14 DeepNoble sendmail[11253]: unable to qualify my own domain name (DeepNoble) -- using short name
Jun  4 03:48:14 DeepNoble sendmail[11253]: w548mESn011253: from=casillas@DeepNoble, size=134, class=0, nrcpts=1, msgid=<201806040848.w548mESn011253@DeepNoble>, relay=casillas@localhost
Jun  4 03:48:14 DeepNoble sm-mta[11277]: w548mECQ011277: from=<casillas@DeepNoble>, size=383, class=0, nrcpts=1, msgid=<201806040848.w548mESn011253@DeepNoble>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun  4 03:48:14 DeepNoble sendmail[11253]: w548mESn011253: to=<[email protected]>, ctladdr=casillas@DeepNoble (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30134, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w548mECQ011277 Message accepted for delivery)
Jun  4 03:48:14 DeepNoble sm-mta[11279]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Jun  4 03:48:14 DeepNoble sm-mta[11279]: w548mECQ011277: to=<[email protected]>, ctladdr=<casillas@DeepNoble> (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120383, relay=gmail-smtp-in.l.google.com. [173.194.67.26], dsn=5.0.0, stat=Service unavailable
Jun  4 03:48:14 DeepNoble sm-mta[11279]: w548mECQ011277: w548mECQ011279: DSN: Service unavailable
Jun  4 03:48:14 DeepNoble sm-mta[11279]: w548mECQ011279: to=<casillas@DeepNoble>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

运行脚本,然后:

Jun  4 03:52:42 DeepNoble sendmail[11335]: My unqualified host name (DeepNoble) unknown; sleeping for retry

长时间的停顿,脚本打印“sent”,然后:

Jun  4 03:53:42 DeepNoble sendmail[11335]: unable to qualify my own domain name (DeepNoble) -- using short name
Jun  4 03:53:42 DeepNoble sendmail[11335]: w548rgKs011335: from=casillas@DeepNoble, size=134, class=0, nrcpts=1, msgid=<201806040853.w548rgKs011335@DeepNoble>, relay=casillas@localhost
Jun  4 03:53:42 DeepNoble sm-mta[11342]: w548rgYu011342: from=<casillas@DeepNoble>, size=383, class=0, nrcpts=1, msgid=<201806040853.w548rgKs011335@DeepNoble>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun  4 03:53:42 DeepNoble sendmail[11335]: w548rgKs011335: to=<[email protected]>, ctladdr=casillas@DeepNoble (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30134, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w548rgYu011342 Message accepted for delivery)
Jun  4 03:53:42 DeepNoble sm-mta[11344]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1.2, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Jun  4 03:53:43 DeepNoble sm-mta[11344]: w548rgYu011342: to=<[email protected]>, ctladdr=<casillas@DeepNoble> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120383, relay=gmail-smtp-in.l.google.com. [74.125.198.27], dsn=5.0.0, stat=Service unavailable
Jun  4 03:53:43 DeepNoble sm-mta[11344]: w548rgYu011342: w548rhYu011344: DSN: Service unavailable
Jun  4 03:53:43 DeepNoble sm-mta[11344]: w548rhYu011344: to=<casillas@DeepNoble>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

编辑 - - - - - - - - - - - - - - - - - - - - - - - - - -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- -------------------------------------------------- ---------

这是我通过阅读本地邮件 ( echo p | mail) 得到的信息,我用“ +++.+++.++.+++”模糊了我当前的 IP 地址:

me@myComputer:~$ echo p | mail
"/var/mail/me": 23 messages 23 new
>N   1 Mail Delivery Subs lun jun  4 03:45  68/2540  Returned mail: see transcript for details
 N   2 Mail Delivery Subs lun jun  4 03:45  64/2674  Returned mail: see transcript for details
 N   3 Mail Delivery Subs lun jun  4 03:45  68/2540  Returned mail: see transcript for details
 N   4 Mail Delivery Subs lun jun  4 03:45  68/2541  Returned mail: see transcript for details
 N   5 Mail Delivery Subs lun jun  4 03:45  68/2541  Returned mail: see transcript for details
 N   6 Mail Delivery Subs lun jun  4 03:45  68/2540  Returned mail: see transcript for details
 N   7 Mail Delivery Subs lun jun  4 03:45  68/2541  Returned mail: see transcript for details
 N   8 Mail Delivery Subs lun jun  4 03:45  68/2542  Returned mail: see transcript for details
 N   9 Mail Delivery Subs lun jun  4 03:45  68/2540  Returned mail: see transcript for details
 N  10 Mail Delivery Subs lun jun  4 03:45  68/2543  Returned mail: see transcript for details
 N  11 Mail Delivery Subs lun jun  4 03:45  68/2517  Returned mail: see transcript for details
 N  12 Mail Delivery Subs lun jun  4 03:45  68/2518  Returned mail: see transcript for details
 N  13 Mail Delivery Subs lun jun  4 03:45  68/2519  Returned mail: see transcript for details
 N  14 Mail Delivery Subs lun jun  4 03:45  68/2519  Returned mail: see transcript for details
 N  15 Mail Delivery Subs lun jun  4 03:45  68/2518  Returned mail: see transcript for details
 N  16 Mail Delivery Subs lun jun  4 03:45  68/2518  Returned mail: see transcript for details
 N  17 Mail Delivery Subs lun jun  4 03:45  64/2651  Returned mail: see transcript for details
 N  18 Mail Delivery Subs lun jun  4 03:45  68/2519  Returned mail: see transcript for details
 N  19 Mail Delivery Subs lun jun  4 03:45  68/2516  Returned mail: see transcript for details
 N  20 Mail Delivery Subs lun jun  4 03:45  68/2519  Returned mail: see transcript for details
 N  21 Mail Delivery Subs lun jun  4 03:46  64/2674  Returned mail: see transcript for details
 N  22 Mail Delivery Subs lun jun  4 03:48  68/2538  Returned mail: see transcript for details
 N  23 Mail Delivery Subs lun jun  4 03:53  68/2540  Returned mail: see transcript for details
Return-Path: <MAILER-DAEMON>
Received: from localhost (localhost)
    by myComputer (8.15.2/8.15.2/Debian-3) id w548GKL8009375;
    Mon, 4 Jun 2018 03:16:20 -0500
Date: Mon, 4 Jun 2018 03:16:20 -0500
From: Mail Delivery Subsystem <MAILER-DAEMON>
Message-Id: <201806040816.w548GKL8009375@myComputer>
To: <me@myComputer>
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
    boundary="w548GKL8009375.1528100180/myComputer"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
Content-Length: 1983

This is a MIME-encapsulated message

--w548GKL8009375.1528100180/myComputer

The original message was received at Mon, 4 Jun 2018 03:16:19 -0500
from localhost [127.0.0.1]

   ----- The following addresses had permanent fatal errors -----
<[email protected]>
    (reason: 550-5.7.1 [+++.+++.++.+++] The IP you're using to send mail is not authorized to)

   ----- Transcript of session follows -----
... while talking to gmail-smtp-in.l.google.com.:
>>> DATA
<<< 550-5.7.1 [+++.+++.++.+++] The IP you're using to send mail is not authorized to
<<< 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your
<<< 550-5.7.1 service provider instead. Learn more at
<<< 550 5.7.1  https://support.google.com/mail/?p=NotAuthorizedError q52-v6si5112685otc.25 - gsmtp
554 5.0.0 Service unavailable

--w548GKL8009375.1528100180/myComputer
Content-Type: message/delivery-status

Reporting-MTA: dns; myComputer
Received-From-MTA: DNS; localhost
Arrival-Date: Mon, 4 Jun 2018 03:16:19 -0500

Final-Recipient: RFC822; [email protected]
Action: failed
Status: 5.7.1
Remote-MTA: DNS; gmail-smtp-in.l.google.com
Diagnostic-Code: SMTP; 550-5.7.1 [+++.+++.++.+++] The IP you're using to send mail is not authorized to
Last-Attempt-Date: Mon, 4 Jun 2018 03:16:20 -0500

--w548GKL8009375.1528100180/myComputer
Content-Type: text/rfc822-headers

Return-Path: <me@myComputer>
Received: from myComputer (localhost [127.0.0.1])
    by myComputer (8.15.2/8.15.2/Debian-3) with ESMTP id w548GJL8009373
    for <[email protected]>; Mon, 4 Jun 2018 03:16:19 -0500
Received: (from me@localhost)
    by myComputer (8.15.2/8.15.2/Submit) id w548GJsR009365;
    Mon, 4 Jun 2018 03:16:19 -0500
Date: Mon, 4 Jun 2018 03:16:19 -0500
From: me <me@myComputer>
Message-Id: <201806040816.w548GJsR009365@myComputer>
Subject: regarding the incredibly deadly viper
To: <[email protected]>
X-Mailer: mail (GNU Mailutils 2.99.99)

--w548GKL8009375.1528100180/myComputer--


Saved 1 message in /home/me/mbox
Held 22 messages in /var/mail/me
scripts bash email postfix sendmail
  • 1 个回答
  • 957 Views
Martin Hope
ENBYSS
Asked: 2018-03-23 05:00:41 +0800 CST

无法安装 sendmail 或更新 Ubuntu [重复]

  • 0
这个问题在这里已经有了答案:
如何安装软件或从旧的不受支持的版本升级? (12 个回答)
4年前关闭。

我正在尝试安装 sendmail,但是每当我运行时sudo apt-get install sendmail,我都会收到以下错误消息:

Err:1 http://mt.archive.ubuntu.com/ubuntu zesty-updates/main amd64 procmail amd64 3.22-25ubuntu0.17.04.1
  404  Not Found
Err:1 http://security.ubuntu.com/ubuntu zesty-security/main amd64 procmail amd64 3.22-25ubuntu0.17.04.1
  404  Not Found
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/procmail/procmail_3.22-25ubuntu0.17.04.1_amd64.deb  404  Not Found
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

运行 sudo apt-get update 或使用 --fix-missing 重试无效,以下仍显示为 Not Found。检查这个问题,我发现问题可能是 Zesty 的生命终结在一月份又回来了。

但是,这里的问题是尝试从设置安装更新或使用 dist-upgrade 失败。Dist-upgrade 特别返回大量 404 错误。至于从设置更新,这是返回的错误:

Detailed errors from the package manager follow:

apt transaction returned result exit-failed

我该如何解决这个问题?

updates upgrade apt sendmail 17.04
  • 1 个回答
  • 915 Views
Martin Hope
Adam R. Grey
Asked: 2016-09-26 20:25:02 +0800 CST

笨蛋消息:“闹钟”

  • 3

简短版:我正在尝试用 Mutt 发送邮件。它失败并说“闹钟”。这是什么意思,我该如何解决?

长版:我有一个运行tiny tiny rss的 ubuntu 服务器。它使用 php 的 mail() 函数发送每日电子邮件摘要。我想让它起作用。我有一个带有谷歌应用程序的域,所以我希望从 [email protected] 发送邮件。我尝试了 postfix 和 sendmail,但我未能正确配置它们(而且我认为因为它们是 MTA,所以无论如何它们都是矫枉过正的)。我听说(阅读:希望)mutt 可用于替换 sendmail 以实现 php 的目的。因此,在从 mutt 发送邮件的最后,我为自己的 gmail 帐户创建了一个 .muttrc,并且发送工作正常。所以我怀疑 mutt 安装正确。但是,当我将配置更改为适用于我的域名时,它不起作用。这是我的新 .muttrc:

set from = "[email protected]"
set realname = "vassago"
set imap_user = "[email protected]"
set imap_pass = <password>
set smtp_url="smtp://[email protected]:587/"
set smtp_pass=<password>
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed ="+[Gmail]/Drafts"
set header_cache = ~/.mutt/cache/headers
set message_cachedir =~/.mutt/cache/bodies
set certificate_file =~/.mutt/certificates
set move = no
set imap_keepalive = 900

如果我只是运行 mutt,我可以看到电子邮件出现。我尝试使用 smtp_url 和 smtp_pass 删除行,但这也不起作用。使用此配置,我运行

echo "hi again" | mutt -s "test03 from mutt" <my email address>

过了一段时间,“闹钟”打印出来,程序返回,邮件表面上没有发送。我究竟做错了什么?

sendmail
  • 2 个回答
  • 2679 Views
Martin Hope
anmaxvl
Asked: 2016-01-04 21:15:49 +0800 CST

ubuntu 上的 sendmail 配置

  • -1

我对 linux 很陌生,并试图在我的 ubuntu 机器上配置 sendmail。有没有办法配置它,使其“像”SMTP 服务器一样工作?我当然做了一些搜索,但是大多数帖子都为网站配置了 sendmail,就我而言,我只是想让发送/接收电子邮件到“世界”成为可能。

sendmail
  • 1 个回答
  • 2728 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve