Skip to content

Commit e073bc4

Browse files
committed
Update Maildir path in entrypoint script and Docker Compose configuration
1 parent cbf5c7b commit e073bc4

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

deploy/postfix/entrypoint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ fi
2828
envsubst '$MSP_DOMAIN $TLS_CONFIG' < /etc/postfix/main.cf.template > /etc/postfix/main.cf
2929
chmod 644 /etc/postfix/main.cf
3030

31-
# Ensure Maildir ownership (volume may be freshly created)
31+
# Ensure Maildir structure exists and is owned by dmarc (volume may be
32+
# freshly created, or parsedmarc may have created dirs as a different UID)
33+
mkdir -p /var/mail/dmarc/Maildir/new \
34+
/var/mail/dmarc/Maildir/cur \
35+
/var/mail/dmarc/Maildir/tmp
3236
chown -R dmarc:dmarc /var/mail/dmarc
3337
chmod 700 /var/mail/dmarc
3438

dmarc_msp/cli/retention.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
@app.command("cleanup-emails")
1616
def cleanup_emails(
17-
maildir: str = typer.Option("/var/mail/dmarc", "--maildir", help="Path to Maildir"),
17+
maildir: str = typer.Option("/var/mail/dmarc/Maildir", "--maildir", help="Path to Maildir"),
1818
config: str | None = typer.Option(None, "--config", "-c"),
1919
):
2020
"""Delete processed email files older than retention.email_days."""

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ services:
2828
- PARSEDMARC_GENERAL_SAVE_FORENSIC=true
2929
- PARSEDMARC_GENERAL_SAVE_SMTP_TLS=true
3030
- PARSEDMARC_GENERAL_INDEX_PREFIX_DOMAIN_MAP=/etc/parsedmarc_domain_map.yaml
31-
- PARSEDMARC_MAILDIR_MAILDIR_PATH=/var/mail/dmarc
31+
- PARSEDMARC_MAILDIR_MAILDIR_PATH=/var/mail/dmarc/Maildir
3232
- PARSEDMARC_MAILDIR_CREATE=true
3333
- PARSEDMARC_MAILBOX_WATCH=true
3434
- PARSEDMARC_MAILBOX_DELETE=false

0 commit comments

Comments
 (0)