Skip to content

bug report: Postfix main.cf:smtpd_milters appends $rspamd_milter on restarts #3482

@polarathene

Description

@polarathene

📝 Preliminary Checks

  • I tried searching for an existing issue and followed the debugging docs advice, but still need assistance.

👀 What Happened?

A user has identified a bug similar to one recently resolved by #3380 where a setting is updated by appending a value, but repeated restarts do not check if it was already appended (internal config is expected to be deterministic at startup, not modified from prior restart).

sed -i -E 's|^(smtpd_milters =.*)|\1 \$rspamd_milter|g' /etc/postfix/main.cf

This sed approach has been used a fair bit and may result in similar bugs elsewhere.


Internal state persisting across restarts is a known concern

This isn't too surprising; maintainers are well aware of DMS not playing well with restarts. We've given explicit advice in many issues to properly restart DMS via either:

  • docker compose down (ctrl +c alone is not equivalent) + docker compose up
  • docker compose up --force-recreate (no down command required).

Our docs also try raise awareness in Usage guide (perhaps should also mention in Debugging docs):

image

Internal configs being changed may not be deterministic with current scripts otherwise. While this approach won't help if any volume mounted configs (that aren't copied internally) were modified by DMS, but we tend to have less assumptions by scripts in those cases to avoid the problem.

👟 Reproduction Steps

No response

🐋 DMS Version

12.1 / edge

💻 Operating System and Architecture

N/A

⚙️ Container configuration files

No response

📜 Relevant log output

No response

Improvements to this form?

No response

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions