mesh-mail: pin mesh-sdk go to release 2, declare the sender account, bus process and work-queue stream (ADR 0436 clauses 7, 8; issue 1172)
This commit is contained in:
@@ -48,7 +48,8 @@
|
||||
"mail-credential-*": {
|
||||
"path": "${dir:state}/mail-credential-*.secret",
|
||||
"issued-by": "outside",
|
||||
"prompt": "the password of the mail account {member}"
|
||||
"prompt": "the password of the mail account {member}",
|
||||
"owner": "mesh-mail-send"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
@@ -83,6 +84,10 @@
|
||||
"state": [
|
||||
"sends"
|
||||
],
|
||||
"emits": [
|
||||
"mail.send.sent",
|
||||
"mail.send.failed"
|
||||
],
|
||||
"streams": [
|
||||
{
|
||||
"name": "mail",
|
||||
@@ -96,13 +101,29 @@
|
||||
"config": "grants",
|
||||
"events": "mail.{key}.**"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mail-sends",
|
||||
"events": [
|
||||
"mail.send.approved"
|
||||
],
|
||||
"max-age-days": 1,
|
||||
"max-mib": 64,
|
||||
"retention": "work-queue",
|
||||
"max-deliveries": 5,
|
||||
"duplicates": 24
|
||||
}
|
||||
],
|
||||
"resources": [
|
||||
{
|
||||
"id": "account",
|
||||
"type": "user",
|
||||
"name": "mesh-mail-send"
|
||||
},
|
||||
{
|
||||
"id": "state",
|
||||
"type": "directory",
|
||||
"mode": "0700",
|
||||
"mode": "0711",
|
||||
"place": ".",
|
||||
"unknown": "program"
|
||||
},
|
||||
@@ -125,7 +146,7 @@
|
||||
"trusted": true,
|
||||
"type": "file",
|
||||
"path": "${dir:state}/accounts.json",
|
||||
"mode": "0600",
|
||||
"mode": "0644",
|
||||
"merge": "json",
|
||||
"template": "files/accounts.json",
|
||||
"takes-config": [
|
||||
@@ -214,6 +235,43 @@
|
||||
"looks": 2,
|
||||
"grace": "180s"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "send",
|
||||
"type": "process",
|
||||
"name": "mesh-mail-send",
|
||||
"artifact": "tools",
|
||||
"run": [
|
||||
"./mesh-mail",
|
||||
"send"
|
||||
],
|
||||
"user": "mesh-mail-send",
|
||||
"env": {
|
||||
"MESH_MAIL_ACCOUNTS": "${dir:state}/accounts.json",
|
||||
"MESH_MAIL_SECRETS": "${dir:state}"
|
||||
},
|
||||
"restart-on": [
|
||||
"accounts"
|
||||
],
|
||||
"bus": {
|
||||
"emits": [
|
||||
"mail.send.sent",
|
||||
"mail.send.failed"
|
||||
],
|
||||
"queues": [
|
||||
"mail-sends"
|
||||
],
|
||||
"state": [
|
||||
"sends"
|
||||
],
|
||||
"asks": true,
|
||||
"invokes": [
|
||||
"seat:operator-channel.tell"
|
||||
]
|
||||
},
|
||||
"health": {
|
||||
"kind": "unit"
|
||||
}
|
||||
}
|
||||
],
|
||||
"build": {
|
||||
|
||||
Reference in New Issue
Block a user