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-208009

wruckie's questions

Martin Hope
wruckie
Asked: 2024-07-19 23:49:09 +0800 CST

如何修复通过 Postfix 发送的系统电子邮件中的默认发件人地址

  • 5

我使用 Ubuntu 22.04 LTS 和 Postfix 通过 SendGrid 发送消息。我按照此处的教程操作https://www.twilio.com/docs/sendgrid/for-developers/sending-email/postfix

我有几个 VPS,我用昵称将它们区分开来 - 这个我命名为 COCONUT。如果地址from拼写正确,一些消息会发出,但所有系统消息都无法发送。发送时,它会尝试从发送, 我收到错误,因为 SendGrid 知道我没有来自“coconut”的权限,因此发送者的身份错误。ps -ely | mailx -s Testing [email protected]from=<root@coconut>

/var/log/mail.log运行时的日志条目ps -ely | mailx -s Testing [email protected]

...
Jul 19 09:28:57 coconut postfix/pickup[624347]: 290E754988: uid=0 from=<root@coconut>
Jul 19 09:28:57 coconut postfix/cleanup[624480]: 290E754988: message-id=<[email protected]>
Jul 19 09:28:57 coconut postfix/qmgr[624348]: 290E754988: from=<root@coconut>, size=17599, nrcpt=1 (queue active)
Jul 19 09:28:57 coconut postfix/smtp[624482]: 290E754988: to=<[email protected]>, relay=smtp.sendgrid.net[44.239.172.8]:587, delay=0.83, delays=0.01/0.01/0.6/0.2, dsn=5.0.0, status=bounced (host smtp.sendgrid.net[44.239.172.8] said: 550 The from address does not match a verified Sender Identity. Mail cannot be sent until this error is resolved. Visit https://sendgrid.com/docs/for-developers/sending-email/sender-identity/ to see the Sender Identity requirements (in reply to end of DATA command))
Jul 19 09:28:57 coconut postfix/cleanup[624480]: F2DC254989: message-id=<[email protected]>
Jul 19 09:28:57 coconut postfix/bounce[624483]: 290E754988: sender non-delivery notification: F2DC254989
Jul 19 09:28:57 coconut postfix/qmgr[624348]: F2DC254989: from=<>, size=20071, nrcpt=1 (queue active)
Jul 19 09:28:57 coconut postfix/qmgr[624348]: 290E754988: removed
...

这是我的/etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
myhostname = coconut.example.com
myorigin = example.com
mydestination = $myhostname, localhost #added to no effect

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

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2

#header_checks = regexp:/etc/postfix/my_custom_header
inet_protocols = ipv4
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_security_level = encrypt
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587

以下是我的/etc/mailname

example.com

以下是我的/etc/hostname

coconut.example.com

关于如何修复从 root@coconut 发送的系统电子邮件,您有什么想法吗?

ubuntu
  • 1 个回答
  • 66 Views
Martin Hope
wruckie
Asked: 2020-11-13 09:07:55 +0800 CST

升级到 Ubuntu 20.04 LTS 后,为什么 mySQL 无法启动?

  • 7

升级到 Ubuntu 20.04 LTS 后,我的 WordPress 网站陷入维护模式。mySQL 试图从文件中每隔几秒重复的这 10 行开始/var/log/mysql/error.log。至少对我来说,快速搜索该术语unknown variable 'query_cache_limit=1M'只会产生说明如何实现此参数的页面。我怎样才能让它再次工作?

2020-11-12T16:12:25.733349Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2020-11-12T16:12:25.735469Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.22-0ubuntu0.20.04.2) starting as process 20068
2020-11-12T16:12:25.746199Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2020-11-12T16:12:26.131087Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2020-11-12T16:12:26.307241Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2020-11-12T16:12:26.370126Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-11-12T16:12:26.370481Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2020-11-12T16:12:26.377752Z 0 [ERROR] [MY-000067] [Server] unknown variable 'query_cache_limit=1M'.
2020-11-12T16:12:26.378449Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-11-12T16:12:27.821939Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.22-0ubuntu0.20.04.2)  (Ubuntu).
mysql ubuntu-20.04
  • 1 个回答
  • 5874 Views
Martin Hope
wruckie
Asked: 2020-11-11 14:30:43 +0800 CST

名称中带有“{u}”的 Ubuntu 20.04 软件包

  • 1

升级到 Ubuntu 20.04 后,某些软件包的名称中有“{u}”。我一直在寻找答案,但看起来谷歌在搜索过程中会立即忽略花括号,或者这不会发生太多。有人可以帮助我提供文档链接吗?这些包名中的{u}表示什么?

user@server:~# sudo aptitude update && sudo aptitude upgrade && sudo apt-get autoremove
Hit http://mirrors.linode.com/ubuntu focal InRelease
Hit http://mirrors.linode.com/ubuntu focal-updates InRelease
Hit http://mirrors.linode.com/ubuntu focal-backports InRelease
Hit http://security.ubuntu.com/ubuntu focal-security InRelease
Hit http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease

The following packages will be REMOVED:
  ack{u} libargon2-0{u} libfile-next-perl{u} libicu65{u}
  python-pkg-resources{u}
0 packages upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 34.4 MB will be freed.
Do you want to continue? [Y/n/?]
packages apt ubuntu-20.04
  • 1 个回答
  • 107 Views
Martin Hope
wruckie
Asked: 2020-05-06 20:27:31 +0800 CST

Apache2 错误 --- .htaccess: 此处不允许评论

  • 1

今晚我将我的 VPS 从 Ubuntu 16.04 LTS 升级到了 Ubuntu 18.04 LTS。一切都按预期工作,在 php aisle 5.6 上进行了一些清理,在 php aisle 7.4 上进行了一些库存货架。在我的所有配置和模块更改后,Apache 重新启动,没有任何呜咽;以为我可以走了。但是我的 4 个站点中有 3 个无法加载;没有干净的 404 页面,只有这个错误配置消息。

Internal Server Error 
The server encountered an internal error or misconfiguration and was unable to complete your request.

在查看了之后/var/log/apache2/error.log,我发现了这一点:

[Wed May 06 03:55:16.190469 2020] [core:alert] [pid 5657] [client 10.10.10.10:56897] 
/var/www/abc/example.com/.htaccess: No comments are allowed here, referer: https://example.com/

在尝试了几种不同的事情之后,似乎开始该行的注释不是问题,而是结束文件正常行的注释。将这些评论删除或移动#main office到他们自己的行会使所有内容重新上线。该# Allow from this IP address行仍在我的 .htaccess 文件中,但不会让我感到任何悲伤。

<Files wp-login.php>
    order deny,allow
    Deny from all
#   
#   Allow from this IP address
    allow from 10.10.10.10      #main office
    allow from 10.10.11.10      #satellite office
</Files>

这是“错误”还是“功能”?在 Google 中搜索“.htaccess:此处不允许发表评论”几乎一无所获。(你知道当第四击是外语时你有麻烦了)。显然,跳转到 Ubuntu 18.04 或相关的 apache 或 php 更新是“何时”,但为什么?为什么这个内联文档有问题?是什么赋予了?

http apache-2.4 ubuntu-18.04 php7
  • 1 个回答
  • 1130 Views
Martin Hope
wruckie
Asked: 2020-04-18 21:44:33 +0800 CST

IIS 将规则重写为带有撇号的黑洞 URL

  • 2

我购买了一个不使用特殊字符的网络应用程序。在查看我的日志时,我看到威胁参与者通过添加撇号和其他通常从不使用的 char() 字符来尝试查看我的站点是否容易受到 SQL 注入的影响。我相信我的应用程序的安全性(大部分),但想看看重写规则或其他方法是否会阻止他们的请求。我的网络应用程序给出了标准错误。我正在寻找规则或想法 1.) 在没有 2.) 给服务器增加大量开销的情况下,尽可能少地向攻击者提供信息。那里有很多重写规则示例,但我发现没有一个可以处理这个角度。

探测的简单示例:https://sub.domain.com/default.aspx?page=3500'A=0&Id=497066

security iis rewrite windows-server-2019
  • 1 个回答
  • 208 Views
Martin Hope
wruckie
Asked: 2019-01-30 14:22:20 +0800 CST

如何在 DNS 中查询特殊的 **NAMED** TXT 记录

  • 5

我正在使用 certbot 为第三方 Web 应用程序生成 ssl 证书。因为我无法进入源代码或文件夹结构,我正在使用 DNS 验证。更复杂的是,我的 DNS 提供商没有明确说明更改何时应用并传播。我必须开始该过程,获取值,将它们发布到 DNS,等待很长时间,然后按 ENTER 以完成验证。如果我等待的时间不够长,或者与服务器的终端会话终止,我必须重新开始——这会生成要放入 DNS 的新值。

我想查询我的 DNS 名称服务器以查看我的_acme_challenge值是否以及何时传播。Let's Encrypt 有办法检查这个值,但我似乎无法弄清楚这个值。我发现的所有在线论坛都是用于查询用于 SPF 的默认 TXT 记录。


certbot 验证过程的输出

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.app.mydomain.com with the following value:

4Rn5ZNCdLYDYK9uQnyZ7k3CJ8kNsNyIJa9QeXCeOCMI

Before continuing, verify the record is deployed.
(This must be set up in addition to the previous challenges; do not remove,
replace, or undo the previous challenge tasks yet. Note that you might be
asked to create multiple distinct TXT records with the same name. This is
permitted by DNS standards.)

如何查询这个命名的TXT 记录?

domain-name-system
  • 2 个回答
  • 5762 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