Repository navigation
Conversation
The controller socket accepts unauthenticated commands and was world-writable (0666), so any local service could retrain the spam filter or change its maps. It is now 0660, group virtualMail: root (the admin rspamc wrapper) and Dovecot's spam/ham learning (mail processes run with gid virtualMail) keep access. Rspamd joins that group only to be allowed to chown the socket; mail homes are 0700 and mail files 0600. Closes #19 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #19
Changes
/run/rspamd/worker-controller.sockchanges from0666(world-writable, set by simple-nixos-mailserver) to0660, ownerrspamd, groupvirtualMail. Access is now limited to:rspamcwrapper;rspamd-learn-spam.sh/-ham.sh, piped from IMAP processes). Those run withmail_gid = virtualMail, so learning by moving mail into or out of Junk keeps working.SupplementaryGroups=virtualMail. That grants it nothing else: mail homes are created0700(NixOShomeModedefault) and Dovecot writes mail with umask0077.Testing
rspamd.confhasbind_socket = "/run/rspamd/worker-controller.sock mode=0660 owner=rspamd group=virtualMail".rspamd.servicehasSupplementaryGroups=virtualMailandredis-rspamd; systemd adds the two together.dovecot.confhasmail_gid = virtualMail.rspamduser, learning via IMAP). It's on thedocs/first-install.mdlist if First-install checklist, just status, robust relay credential permissions #41 is merged.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22o7QQ17GRtkCqpJNFr9B
Generated by Claude Code