AkurAI Build
Menu

Public repository / 8ceea9aef86118464a1320ece81d11ceeb87f57b

AkurAI-Mail / scripts/akurai-mail-hook.service

Latest change b7f6b07335df8810394a514c92fa3f27657e3319 - hook: push new-mail notifications to pi-bun on delivery (drop pi-bun 5-min poll) by Ólafur Búi Ólafsson

[Unit]
Description=AkurAI Mail delivery hook — pushes new-mail notifications to pi-bun over the AkurAI-VPN mesh
Documentation=https://mail.olibuijr.com
After=network-online.target dovecot.service
Wants=network-online.target

[Service]
Type=simple
# AKURAI_MAIL_PIBUN_URL is written by deploy.sh; AKURAI_MAIL_PIBUN_TOKEN is
# injected out-of-band with: akurai-ec2 secret-sync akurai-mail-hook.service \
#   AKURAI_MAIL_PIBUN_TOKEN /etc/akurai-mail-hook.env   (value read from stdin)
EnvironmentFile=-/etc/akurai-mail-hook.env
ExecStart=/usr/local/sbin/akurai-mail-server hook-watch
Restart=always
RestartSec=5
# The watcher only reads Maildir directory events (never message bodies) and
# POSTs {account} to pi-bun; pi-bun runs the maintained semantic sync.
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=read-only
ReadOnlyPaths=/var/vmail
PrivateTmp=true

[Install]
WantedBy=multi-user.target