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

Zumo de Vidrio's questions

Martin Hope
Zumo de Vidrio
Asked: 2021-08-28 06:25:05 +0800 CST

Postfix 双继电器配置

  • 0

我有 2 台带后缀的服务器。

带有此 main.cf 的 ServerA:

relayhost = smtp.public.com:587
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smarthost_passwd
smtp_sasl_security_options =

从服务器 A 在本地发送电子邮件工作正常,它通过公共 smtp 正确中继并且消息到达目的地

现在我想配置 ServerB,这样当我从它发送电子邮件时,它将直接转到 ServerA,它应该通过公共 smtp 服务器发送电子邮件(就像从 ServerA 本身发送时一样)

在端口 25 上从 ServerB 到 ServerA 的 Telnet 工作正常。

如何执行此配置?我什至无法找到正确的词来搜索它。


编辑

在遵循经过验证的答案后它起作用了。

如果这对其他人有用,这些是我最终使用的配置文件:

服务器A:

主文件:

relayhost = <IP/domain SMTP externe>:<port>
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smarthost_passwd
smtp_sasl_security_options =
mynetworks = <Net of ServerB>

/etc/postfix/smarthost_passwd:

<IP/domain SMTP externe>:<port>     <user>:<pass>

服务器B:

主文件:

relayhost = <hostname_ServerA>:<port>
smtp_use_tls=yes
smtp_sasl_auth_enable = no
smtp_sasl_security_options =
linux ubuntu email postfix email-server
  • 1 个回答
  • 167 Views
Martin Hope
Zumo de Vidrio
Asked: 2020-11-27 01:14:56 +0800 CST

NTP 始终在本地同步

  • 0

我有一个具有以下 NTP 配置的 Ubuntu 16.04:

driftfile /var/lib/ntp/drift

restrict -4 default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

restrict 127.0.0.1 nomodify notrap
restrict 10.0.200.15 mask 255.255.255.0 nomodify notrap

server 127.127.1.0
fudge 127.127.1.0 stratum 10

server 0.ntp.pool.org iburst prefer minpoll 4 maxpoll 7
server 1.ntp.pool.org iburst prefer minpoll 4 maxpoll 7
server 2.ntp.pool.org iburst prefer minpoll 4 maxpoll 7
tinker panic 0

restrict 127.0.0.1
restrict -6 ::1

但它总是与 localhost 同步(我认为是因为层值较低):

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 127.127.1.0     .LOCL.          10 l  16h   64    0    0.000    0.000   0.000
 64.99.80.121    .STEP.          16 u    -  128    0    0.000    0.000   0.000

但是我希望它与外部 NTP 同步ntp.pool.org

我已将 ubuntu ntp 服务器添加到 ntp.conf 文件中:

server ntp.ubuntu.com iburst prefer minpoll 4 maxpoll 7

现在我看到它有一个第 2 层,并且 ntp 能够与之同步:

     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
 127.127.1.0     .LOCL.          10 l  16h   64    0    0.000    0.000   0.000
 64.99.80.121    .STEP.          16 u    -  128    0    0.000    0.000   0.000
*91.189.91.157   194.58.200.20    2 u   15  128  377   79.191    0.042   1.964

为ntptrace两台服务器提供超时:

$ ntptrace ntp.ubuntu.com
ntp.ubuntu.com: timed out, nothing received
***Request timed out
$ ntptrace ntp.pool.org
ntp.pool.org: timed out, nothing received
***Request timed out

我是否缺少一些只能与同步的配置ntp.pool.org?

我已经在这里检查了答案, 但我没有找到适合我的案例的答案


更新

此 VM 将充当其他 VM 的 ntp 服务器。

查询结果:

ntpdate -q ntp.pool.org
server 64.99.80.121, stratum 0, offset 0.000000, delay 0.00000
26 Nov 14:34:37 ntpdate[4577]: no server suitable for synchronization found
ntpdate -q ntp.ubuntu.com
server 91.189.94.4, stratum 2, offset 0.000290, delay 0.03615
server 91.189.89.199, stratum 2, offset 0.000654, delay 0.03668
server 91.189.89.198, stratum 2, offset -0.000251, delay 0.03674
server 91.189.91.157, stratum 2, offset 0.000159, delay 0.10548
26 Nov 14:36:15 ntpdate[4585]: adjust time server 91.189.94.4 offset 0.000290 sec

我在 ntp 文档中发现第 16 层表明 ntp 服务器存在一些问题。我们可以得出结论,这ntp.pool.org是行不通的吗?

linux ntp time-synchronization ntpd
  • 2 个回答
  • 572 Views
Martin Hope
Zumo de Vidrio
Asked: 2020-03-12 05:22:13 +0800 CST

Docker swarm manager 和 node 同时

  • 1

由于物理资源的限制,我需要知道是否可以同时声明与管理器和节点相同的主机?

我在官方文档中找不到任何内容。如果在技术上可行,这是一个好习惯吗?它会引起任何问题吗?

docker docker-swarm
  • 1 个回答
  • 513 Views
Martin Hope
Zumo de Vidrio
Asked: 2020-02-22 05:27:13 +0800 CST

域转发配置

  • 0

我有一个在 url service.old_domain.com 中运行的服务网络(托管在内部 DNS 服务中)

现在我想从 url service.new_domain.com 进行重定向(托管在外部 DNS 服务中)

在外部 DNS 服务中添加CNAME是否足够,例如:

service.new_domain.com -> service.old_domain.com

或者我应该添加一个A类,比如:

service.new_domain.com -> "service.old_domain.com" 的 IP 地址

domain-name-system dns-zone
  • 1 个回答
  • 35 Views
Martin Hope
Zumo de Vidrio
Asked: 2020-02-21 05:50:09 +0800 CST

Docker流代理多域转发

  • 0

我在 docker 上运行多个 redmine 实例,其中使用docker flow 代理ACL 处理 Web 请求,因此每个 ACL 都在运行的 docker 容器的名称与其在文件haproxy.cfg中配置的域之间执行链接

我的问题是是否可以将 2 个不同的域指向同一个 redmine 实例。我一直在查看 docker flow 代理配置,但找不到答案。

docker haproxy
  • 1 个回答
  • 155 Views
Martin Hope
Zumo de Vidrio
Asked: 2017-05-05 05:44:28 +0800 CST

减少 zabbix 服务器与数据库的连接

  • 1

是否可以定义数据库池值以减​​少从 zabbix 服务器发送的数据库连接?

我看到一个方法是通过 apache mod_fcgid 完成的,是否也可以通过 mod mpm_prefork 完成?

通过进行测试(只有 2 个用户通过 web gui 连接),当我的数据库服务器限制为 100 时,我发现到数据库服务器的传出连接有 60 个,当我的限制为 20 时(当然它不起作用)和限制为 30 时,我发现了 23 个我有 29 个传出连接,为什么会有这样的差异?

在我看来,不知何故,zabbix 能够识别最大数据库连接数来创建传出连接,但老实说这对我来说有点奇怪,当我增加数据库服务器中的池时,zabbix 似乎滥用资源。

该场景是一个共享的 PostgreSQL 服务器,这就是为什么在我的情况下增加数据库服务器端的池不是一个好主意。

Zabbix 安装在 CentOS 7 服务器上。

linux
  • 1 个回答
  • 1506 Views
Martin Hope
Zumo de Vidrio
Asked: 2016-11-23 01:52:54 +0800 CST

Apache mod_proxy_balancer 配置

  • 0

环境:5 个 apache 实例 (balancerX),在 3 个应用服务器 (serverX) 之间分配流量。

使用具有相同负载因子的请求的 mod_balancer 配置,server1 的负载很大,而其他的负载较小,这就是为什么平衡器配置以相同的方式应用于所有服务器,无论它们的实际负载如何,所以总是第一个与 balancer1、2、3、4 或 5 的连接被重定向到 server1。由于由于硬件平衡器(不幸的是无法管理),用户被随机分配了平衡器,因此我无法控制 3 台服务器接收相同数量的连接。

如何将其配置为在 server1、2 和 3 上具有相同的负载?

架构:

Balancer1   Balancer2   Balancer3   Balancer4   Balancer5
---------   ---------   ---------   ---------   ---------
Server1     Server1     Server1     Server1     Server1
Server2     Server2     Server2     Server2     Server2
Server3     Server3     Server3     Server3     Server3
mod-proxy apache2
  • 1 个回答
  • 231 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