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

jurijus01's questions

Martin Hope
jurijus01
Asked: 2025-01-06 06:16:36 +0800 CST

尽管允许 ipv6,ipTables 仍阻止 ipv4 端口 25 流量。可以修复吗?

  • 6

对端口 25 上的有限 IPv4 连接进行故障排除。

有 ipTables 规则:

  Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  185.121.228.0/24     anywhere            
ACCEPT     all  --  127.0.0.0/24         anywhere            
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:smtp

一旦默认 INPUT 策略为 ACCEPT,

root@mail:/home/ubuntu# echo “HELO” | nc -4 smtp.google.com 25
220 mx.google.com ESMTP ffacd0b85a97d-38a1c8bb5f7si23003263f8f.375 - gsmtp
502-5.5.1 Unrecognized command. For more information, go to
502 5.5.1  https://support.google.com/a/answer/3221692 ffacd0b85a97d-38a1c8bb5f7si23003263f8f.375 - gsmtp

一旦默认 INPUT 策略为 DROP,相同的命令将无限期挂起。

现在最有趣的部分是 INPUT 策略的改变对

root@mail:/home/ubuntu# echo “HELO” | nc -6 smtp.google.com 25

无论如何,它都会得到 Google 的回应。

需要让邮件服务器将邮件发送到所有其他邮件服务器,而不仅仅是兼容 ipv6 的邮件服务器。

如果有人能解释一下发生了什么,那就太好了!

更新:ip-save 打印输出为:

:INPUT DROP [41791:1739301]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [6390374:3802889072]
-A INPUT -i ens3 -p tcp -m tcp --dport 25 -j ACCEPT
-A INPUT -s 127.0.0.0/24 -i lo -j ACCEPT
-A INPUT -s 185.121.228.0/24 -i ens3 -j ACCEPT
COMMIT
iptables
  • 1 个回答
  • 53 Views
Martin Hope
jurijus01
Asked: 2024-12-30 20:30:36 +0800 CST

iRedMail 和 IpTables - 邮件未送达且无错误。如何解决?

  • 5

您好,祝您新年除夕快乐!

尝试防火墙 iRedMail 安装。需要仅保持对传入连接必要的端口开放。当前规则如下:

Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:submission
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:submissions
ACCEPT     all  --  localhost            anywhere  
ACCEPT     all  --  185.121.228.0/24     anywhere

      

最后一条规则是保持自己的 SSH 连接处于活动状态。

目前没有邮件收发,没有错误,也没有退回的电子邮件。怀疑这可能与用于 SMTP 的 SSL 证书无法解析主机名有关,但我已为其启用了端口 53“域”,但这没有帮助。

卡在这里。一旦默认策略从 DROP 更改为 ACCEPT,它就会变得轻而易举。

非常感谢任何关于如何正确防火墙 iRedMail 服务器的想法!

编辑:为此启用了 SMTP(端口 25),但无论如何它都没有被使用。没有效果

Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:smtp
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:submission
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:submissions
ACCEPT     all  --  localhost            anywhere            
ACCEPT     all  --  185.121.228.0/24     anywhere    

    
iptables
  • 1 个回答
  • 55 Views
Martin Hope
jurijus01
Asked: 2024-12-27 02:54:11 +0800 CST

就 MX 记录而言,我对邮件服务器的配置有什么错误?

  • 5

你好,节日快乐,

有一台邮件服务器 mail.giftbutton.com,用于收发邮件。问题是它没有 MX 记录,根据https://mxtoolbox.com和https://www.mail-tester.com/测试。

DNS 记录包括:

A   @   51.89.216.247
A   mail    146.59.32.248
MX  @   mail.giftbutton.com. (Priority: 10)
TXT dkim._domainkey.mail v=DKIM1;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwUBorg14HW4dVb61hgTPKhGBaef2Qn7R5arBSmKitKqL2wySVUn3TIRd1DGqDG00TEAPhMkvzexm680y5OEV+lYlmBh/EZNrinYUZToL61vp4tKt690YbI3EuaJcIZryT40eGg8JWMmL6CvAwrRh2lC7ynhmqC1u8YfXiN/hJ7U7GUMrJWnXzKqDytqPkwPstnxwlYwPY+picMBtqqp7gWhmoSROj5vu47XROg3V1THEw7d5tmpEPbTx26+NRstxE9Gg6bJWpjkfdA4545LQh2Ykv4elChyMlnTwCbcS4ySfiQpK1/0zhnylxzcPeZGpw1TNWciX7rd0BbAYOQMDBQIDAQAB
TXT mail v=spf1 ip4:146.59.32.248 ip6:2001:41d0:601:1100::5a97 ~all
TXT _dmarc.mail v=DMARC1; p=reject; rua=mailto:[email protected];

我配置错误了什么?

非常感谢您的任何想法。

更新:这是 mail-tester.com 返回的报告:

 [SPF] Your server 146.59.32.248 is authorized to use [email protected]
 Your DKIM signature is valid
 Your message passed the DMARC test
 Your server 146.59.32.248 is successfully associated with mail.giftbutton.com
 We didn't find a mail server (MX Record) behind your domain name mail.giftbutton.com.

如果存在 mail.giftbutton.com 的 MX 记录,为什么 mail-tester.com 看不到它?

正如之前有人在这里解释的那样,从子域发送邮件比从域发送邮件更好。如果用户心情不好并将通知电子邮件标记为垃圾邮件,则子域的垃圾邮件积分将累积。这不会影响其他子域 - 例如 accounts.giftbutton.com。

我需要在 DNS 配置中更改哪些内容才能完全通过垃圾邮件检查?

mx-record
  • 1 个回答
  • 71 Views
Martin Hope
jurijus01
Asked: 2024-12-23 19:18:13 +0800 CST

iptables 配置保存在哪里?

  • 5

iptables 配置保存在哪里?研究无果:

/etc/iptables - no such file or directory
/etc/sysconfig - no such file or directory
/etc/init.d/iptables - no such file or directory
/etc/network/if-up.d/ contains ethtool only
/etc/network/if-pre-up.d/ contains ethtool only

还有其他地方吗?运行 Ubuntu 24.04.1 LTS

非常感谢您的想法。

iptables
  • 1 个回答
  • 39 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