使用 postfix 无法接收电子邮件

使用 postfix 无法接收电子邮件

我正在使用后缀通过任务从天蓝色管道发送电子邮件。我在管道中使用 Ubuntu 20.04。这是我创建的任务,其中有简单的 bash 脚本。

sudo apt install mailutils

echo "Hello World" | mail -s "Sending email!" [email protected]

sudo tail -f /var/log/mail.log

当我运行管道时,我得到以下信息:

Postfix (main.cf) 现在已使用默认配置进行设置。如果您需要进行更改,请根据需要编辑 /etc/postfix/main.cf (和其他)。要查看 Postfix 配置值,请参阅 postconf(1)。

修改 main.cf 后,请务必运行“systemctl reload postfix”。

Running newaliases
Created symlink /etc/systemd/system/multi-user.target.wants/postfix.service → /lib/systemd/system/postfix.service.
Setting up guile-2.2-libs:amd64 (2.2.7+1-4) ...
Setting up libgsasl7:amd64 (1.8.1-1) ...
Setting up libmailutils6:amd64 (1:3.7-2.1) ...
Setting up mailutils (1:3.7-2.1) ...
update-alternatives: using /usr/bin/frm.mailutils to provide /usr/bin/frm (frm) in auto mode
update-alternatives: using /usr/bin/from.mailutils to provide /usr/bin/from (from) in auto mode
update-alternatives: using /usr/bin/messages.mailutils to provide /usr/bin/messages (messages) in auto mode
update-alternatives: using /usr/bin/movemail.mailutils to provide /usr/bin/movemail (movemail) in auto mode
update-alternatives: using /usr/bin/readmsg.mailutils to provide /usr/bin/readmsg (readmsg) in auto mode
update-alternatives: using /usr/bin/dotlock.mailutils to provide /usr/bin/dotlock (dotlock) in auto mode
update-alternatives: using /usr/bin/mail.mailutils to provide /usr/bin/mailx (mailx) in auto mode
Processing triggers for rsyslog (8.2001.0-1ubuntu1.3) ...
Processing triggers for ufw (0.36-6ubuntu1) ...
Processing triggers for systemd (245.4-4ubuntu3.21) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Jun 20 16:30:43 fv-az146-323 postfix/postfix-script[2701]: starting the Postfix mail system
Jun 20 16:30:43 fv-az146-323 postfix/master[2703]: daemon started -- version 3.4.13, configuration /etc/postfix
Jun 20 16:30:53 fv-az146-323 postfix/pickup[2704]: 12D29BFAB4: uid=1001 from=<vsts@fv-az146-323>
Jun 20 16:30:53 fv-az146-323 postfix/cleanup[4047]: 12D29BFAB4: message-id=<20230620163053.12D29BFAB4@fv-az146-323.zgw1fchrns0ulmuh1ptdxdixcf.ax.internal.cloudapp.net>
Jun 20 16:30:53 fv-az146-323 postfix/qmgr[2705]: 12D29BFAB4: from=<vsts@fv-az146-323>, size=451, nrcpt=1 (queue active)
Jun 20 16:30:55 fv-az146-323 postfix/smtp[4049]: 12D29BFAB4: to=<[email protected]>, relay=mxa-00198502.gslb.pphosted.com[185.132.180.7]:25, delay=2.2, delays=0.01/0.01/1.6/0.54, dsn=2.0.0, status=sent (250 2.0.0 3rb8h1un11-1 Message accepted for delivery)
Jun 20 16:30:55 fv-az146-323 postfix/qmgr[2705]: 12D29BFAB4: removed

据我了解,postfix 已经完成了从 from=<vsts@fv-az146-323 发送电子邮件的工作。但由于此电子邮件不存在,我公司的 SMTP 服务器必须假设它是垃圾邮件并拒绝它(这是我的假设,因为我没有收到任何电子邮件,也没有收到任何有关失败的通知)

我该如何纠正这个问题?我能否以某种方式调整 postfix 来更新发件人地址,以便我公司的 SMTP 服务器不会拒绝它?

有人这样做过吗?

相关内容