Files
selfpost/internal/postfix/write.go
T
mixandCursor 81190a7aad
test / test (push) Has been cancelled
phase1-3: apply review fixes and docs alignment
Implement phase 1 and 2 review actions (DMARC UI CSS fixes, bounded DMARC ingest stdin,
rate-limit eviction hardening, settings/user handler cleanup, shared atomic/supervisor helpers)
and phase 3 documentation/changelog updates including roadmap and accepted-risk notes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-19 19:06:33 +03:00

15 lines
421 B
Go

package postfix
import (
"os"
"github.com/mixeme/selfpost/internal/atomicfile"
)
// writeFileAtomic writes data to path via a temp file in the same directory
// followed by a rename, so a concurrent Postfix reload only ever sees the
// complete old or new map, never a partial write (security.md).
func writeFileAtomic(path string, data []byte, perm os.FileMode) error {
return atomicfile.Write(path, data, perm)
}