AkurAI Build
Menu

Public repository / 7a284f40b2637792d0599c38c4cac0342da676d7

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

Latest change 7a284f40b2637792d0599c38c4cac0342da676d7 - Merge live EC2 ops copies into scripts/ and tools/ by Ólafur Búi Ólafsson

[Unit]
Description=AkurAI Mail delivery hook — creates assigned Multica issues from Klara's mail and pushes new-mail notifications to pi-bun
Documentation=https://mail.olibuijr.com
After=network-online.target dovecot.service
Wants=network-online.target

[Service]
Type=simple
# Direct Multica endpoint, token, project, and mailbox-to-agent routes are
# injected out-of-band through /etc/akurai-mail-hook.env.
# Optional pi-bun push: 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). Without the token the pi-bun push is skipped.
EnvironmentFile=-/etc/akurai-mail-hook.env
ExecStart=/usr/local/sbin/akurai-mail-server hook-watch
Restart=always
RestartSec=5
# The watcher reads delivered messages only to authenticate Klara, extract the
# request, and create one deduplicated, assigned Multica issue; the pi-bun push
# sends only {account}, and pi-bun runs the maintained semantic sync.
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=read-only
ReadOnlyPaths=/var/vmail
ReadWritePaths=/var/lib/akurai-mail-hook
PrivateTmp=true

[Install]
WantedBy=multi-user.target