DKIM 套接字问题

发布于 2024-10-06 09:30:30 字数 570 浏览 0 评论 0原文

我对 dkim-milter 有疑问。

我的邮件日志文件充满了日志,

Dec  5 23:59:59 NS1 dkim-filter[31424]: Sendmail DKIM Filter: Unable to bind to port inet:20209@localhost: Address already in use
Dec  5 23:59:59 NS1 dkim-filter[31424]: Sendmail DKIM Filter: Unable to create listening socket on conn inet:20209@localhost
Dec  5 23:59:59 NS1 dkim-filter[31424]: smfi_opensocket() failed

我怀疑问题与 Dkim-filter.conf 和行有关:

Socket                  inet:20209@localhost

看起来有些东西已经在该端口上运行,所以我无法再次绑定它。

如何更改此设置并使 DKIM 正常运行?

I have a problem with dkim-milter.

My maillog file is filled with logs

Dec  5 23:59:59 NS1 dkim-filter[31424]: Sendmail DKIM Filter: Unable to bind to port inet:20209@localhost: Address already in use
Dec  5 23:59:59 NS1 dkim-filter[31424]: Sendmail DKIM Filter: Unable to create listening socket on conn inet:20209@localhost
Dec  5 23:59:59 NS1 dkim-filter[31424]: smfi_opensocket() failed

I suspect that the problem is related to Dkim-filter.conf and line:

Socket                  inet:20209@localhost

It looks like something is allready runing on that port so I can't bind it again.

How can I change this and make DKIM running without errors?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

少女的英雄梦 2024-10-13 09:30:30

请注意,我发现当我手动停止并重新启动 dkim-milter 服务时,我的日志中充满了该消息。这是由于配置选项“AutoRestart”默认为“Yes”。

启用该选项后,当使用“service dkim-milter stop”停止服务时,它会自动重新启动,并且当我的 shell 脚本运行“service dkim-milter”时,它会自动重新启动。几秒钟后,它正在重复该过程,并且无法连接到端口,因为它已经在运行。

我的经验不足,不知道最好的方法是修复它,但上述问题已经过测试并且可重复。

As a note, I found that when I manually stopped and restarted the dkim-milter service, my logs filled up with that message. This was due to the config option "AutoRestart" which defaults to Yes"

With that option on, when the service is stopped using "service dkim-milter stop", it automatically restarts, and when my shell script then ran "service dkim-milter start" a few seconds later, it was duplicating the process and was unable to connect to the port as it was already running.

I am not really experienced enough to know the best was to fix it, but the problem above was tested and repeatable.

绾颜 2024-10-13 09:30:30

就我而言,我运行了错误的命令。 我不是在跑步,而是

sudo opendkim -x /etc/opendkim.conf -p inet:8891@localhost

在跑步:

sudo opendkim -x /etc/opendkim.conf -p init:8891@localhost

不确定这种情况有多常见,但我确实花了一段时间才发现。

In my case, I was running the wrong command. Instead of running

sudo opendkim -x /etc/opendkim.conf -p inet:8891@localhost

I was running:

sudo opendkim -x /etc/opendkim.conf -p init:8891@localhost

Not sure how common this is, but it sure took me a while to track down.

爱格式化 2024-10-13 09:30:30

端口 20209 已被使用,也许是旧的僵尸 dkim-milter?

netstat -nlp | netstat -nlp | netstat -nlp | netstat -nlp | netstat -nlp | netstat -nlp grep 20209 将帮助您找出阻塞端口的原因

port 20209 is already in use, maybe an old zombie dkim-milter?

netstat -nlp | grep 20209 will help you find out whats blocking the port

吃兔兔 2024-10-13 09:30:30

我遇到了同样的问题,因此在朋友的帮助下,我按照以下步骤操作:

  • 显示日志中最近的 25 个错误(/path/to/file): tail -n 25 /var/log/maillog
  • 监听特定端口 (20209) 以查看是什么阻止了它:netstat -nlp | grep 20209
  • 检查服务的状态(在本例中为 dkim-milter): service dkim-milter status
  • 显示名称中带有“filter”的所有进程,因为 dkim-milter 是
    作为 dkim-filter 运行: ps ax | grep filter
  • Kill process with pid fe 32731: kill 32731

现在产生错误的进程没有运行。

这是重新启动 dkim-milter 和 postfix 的方法:

service dkim-milter stop
service dkim-milter start
service postfix restart

现在一切似乎都正常

I had the same problem so with the help of a friend I followed the steps below:

  • Show 25 more recent errors from logs (/path/to/file): tail -n 25 /var/log/maillog
  • Listen to specific port (20209) to see what's blocking it: netstat -nlp | grep 20209
  • Check status of a service (dkim-milter in this case): service dkim-milter status
  • Show all proccesses with "filter" in name, because dkim-milter is
    running as dkim-filter: ps ax | grep filter
  • Kill process with pid f.e. 32731: kill 32731

Now the process which produced the errors isn't running.

This is how to restart to dkim-milter and postfix:

service dkim-milter stop
service dkim-milter start
service postfix restart

And everything seemed to work ok now

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文