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
    • 最新
    • 标签
主页 / user-284506

Dushyant Joshi's questions

Martin Hope
Dushyant Joshi
Asked: 2020-02-14 00:26:01 +0800 CST

无法使用 postfix-sendmail 发送邮件并被退回

  • 0

电子邮件未发送到以 domainname.co 作为域名的电子邮件地址。

我在 Ubuntu 系统中有三个用户,即 root、ubuntu 和域名。

以下是日志(tail /var/log/mail.log -n 20)

Feb 19 04:36:56 server postfix/pickup[22963]: 521A0106D3A: uid=1003 from=<domainname>
Feb 19 04:36:56 server postfix/cleanup[26043]: 521A0106D3A: message-id=<[email protected]>
Feb 19 04:36:56 server postfix/qmgr[14300]: 521A0106D3A: from=<[email protected]>, size=357, nrcpt=1 (queue active)
Feb 19 04:36:58 server postfix/smtp[26045]: 521A0106D3A: to=<[email protected]>, relay=in.hes.trendmicro.com[54.219.191.20]:25, delay=1.9, delays=0.01/0.01/1.6/0.21, dsn=5.7.1, status=bounced (host in.hedmicro.com[54.219.191.20] said: 550 5.7.1 <[email protected]>: Recipient address rejected: ERS-DUL. (in reply to RCPT TO command))
Feb 19 04:36:58 server postfix/cleanup[26043]: 732DD106D41: message-id=<[email protected]>
Feb 19 04:36:58 server postfix/bounce[26046]: 521A0106D3A: sender non-delivery notification: 732DD106D41
Feb 19 04:36:58 server postfix/qmgr[14300]: 732DD106D41: from=<>, size=2368, nrcpt=1 (queue active)
Feb 19 04:36:58 server postfix/qmgr[14300]: 521A0106D3A: removed
Feb 19 04:36:59 server postfix/smtp[26045]: 732DD106D41: to=<[email protected]>, relay=in.hes.trendmicro.com[54.219.191.21]:25, delay=1.5, delays=0/0/1.3/0.21, dsn=5.7.1, status=bounced (host in.hes.trendmicro.com[54.219.191.21] said: 550 5.7.1 <[email protected]>: Recipient address rejected: ERS-DUL. (in reply to RCPT TO command))
Feb 19 04:37:00 server postfix/qmgr[14300]: 732DD106D41: removed

/etc/postfix/main.cf的内容

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = server.domainname.co
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
myorigin = $mydomain
mydestination = $myhostname, server, localhost.domainname.co, localhost
#smtp_generic_maps = texthash:/etc/postfix/generic
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtp_tls_security_level = may
allow_percent_hack = no

我正在用下面的脚本检查这个。

$sender = '[email protected]';
$recipient = '[email protected]';

$subject = "php mail test";
$message = "php test message";
$headers = 'From:' . $sender;

if (mail($recipient, $subject, $message, $headers)) {
        echo "Message accepted";
} else {
        echo "Error: Message not accepted";
}

更新:当前的答案将无济于事,因为在 main.cf 文件中的一些配置更改后错误代码发生了变化。

ubuntu php postfix email-bounces
  • 3 个回答
  • 1314 Views
Martin Hope
Dushyant Joshi
Asked: 2019-07-12 20:37:07 +0800 CST

删除文件夹中除一个文件外的所有文件和目录

  • 3

我想删除文件夹中的所有文件和目录,比如“A”。但除了该文件夹中的一个文件说.keep。我尝试了以下命令。

找到 !-name '.keep' -type f -exec rm -f {} +

但上面的命令也会删除文件夹 A。我不希望这样。有几个与此相关的答案。但他们都提到进入那个目录。我想在命令中提及该目录,而无需 cd-e 进入该目录。

linux
  • 2 个回答
  • 504 Views
Martin Hope
Dushyant Joshi
Asked: 2016-09-09 22:40:37 +0800 CST

Apache 服务器与 PCI 的兼容性

  • -2

我不知道这是否是一个合适的地方问,所以请帮我解决这个问题。

问:我想知道 Apache Web 服务器是否兼容 PCI Compliant Payment 环境。

apache-2.2 magento pci-dss
  • 1 个回答
  • 59 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