Mail relay: review of 7d766b6 — R-1 to R-12, four mutations, two sentences

- R-1 a delivered token becomes the one in use only on 200 or a refusal given after authentication
- R-2 a token of another site is refused by what /v1/status says (access-key field, scripts); docs for staging
- R-3 the confirm route looks the nonce up first and counts only refused calls
- R-4 one budget of time per message (10 s, 30 s with files), enrolment and retries included
- R-5 'Disconnect' without the service's answer is not confirmed and keeps the token to try again
- R-6 no enrolment without the confirm route in the config
- R-7 half an SMTP set-up: one log line and a hint in the panel
- R-8 to R-10, R-12 docs; R-11 the last failure stays in the state block
- tests for redirect: manual, the candidate's nonce, the expectation taken back, one recipient only

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-25 22:07:10 +01:00
co-authored by Claude Fable 5.2
parent 0ee74ab2a4
commit a2b07b1dc1
23 changed files with 584 additions and 69 deletions
@@ -18,8 +18,10 @@ export const integrationsTexts = defineTexts({
mailRelayDisconnect: 'Disconnect',
mailRelayDisconnectConfirm: `Disconnect the site from ${IWSN}? E-mails will not be sent until you connect again or fill in an SMTP server.`,
mailRelayDisconnected: `The site is disconnected from ${IWSN}.`,
mailRelayDisconnectUnconfirmed: `${IWSN} could not be reached, so the disconnection is not confirmed. E-mails are no longer sent; press Disconnect again later.`,
mailRelayForbidden: 'Only an administrator can do this.',
mailRelayHeading: 'How e-mails are sent',
mailRelayLastFailure: 'An e-mail was not sent on {{date}}. Code: {{code}}.',
mailRelayLoadFailed: 'The state could not be read. Try again.',
mailRelayLoggedOut: 'Your session has ended. Log in again.',
mailRelayNameReplaced: `${IWSN} did not accept the sender name "{{asked}}", so e-mails leave as "{{used}}". Choose another name below.`,
@@ -32,14 +34,17 @@ export const integrationsTexts = defineTexts({
mailRelayRefusedHost: `This site has no public address yet ({{host}}). ${IWSN} works once the site runs on its domain.`,
mailRelayRefusedNoHost: 'The site does not know its own address. Ask your administrator.',
mailRelayRefusedOther: `${IWSN} answered: {{message}}`,
mailRelayRefusedSetup: `${IWSN} is not fully set up on this site. Ask your administrator.`,
mailRelayRefusedToken: `The access key of this site is no longer valid. Ask your administrator for a new one.`,
mailRelayRepliesTo: 'Replies go to {{address}}.',
mailRelaySmtpIncomplete: `The SMTP settings below are incomplete, so e-mails go through ${IWSN}. Fill in server, user name and password, or empty them.`,
mailRelayStateActive: `Connected to ${IWSN}.`,
mailRelayStateDisconnected: 'Disconnected. E-mails are not sent until you connect again or fill in an SMTP server.',
mailRelayStateNotConnected: 'Not connected yet. The site connects by itself when it sends its first e-mail.',
mailRelayStatePending: 'The site is waiting for approval, so e-mails are not sent yet. Ask your administrator.',
mailRelayStateSuspended: 'E-mail sending was stopped for this site. Ask your administrator.',
mailRelayToken: 'Enter an access key',
mailRelayTokenForeign: 'This access key belongs to another site, so it was not saved. Ask your administrator for a key for this site.',
mailRelayTokenHint: 'Only when your administrator gave you a key for this site. It is stored and never shown again.',
mailRelayTokenInvalid: `This is not an access key of ${IWSN}.`,
mailRelayTokenSave: 'Save the key',
@@ -131,8 +136,10 @@ export const integrationsTexts = defineTexts({
mailRelayDisconnect: 'Rozłącz',
mailRelayDisconnectConfirm: `Rozłączyć witrynę z ${IWSN}? E-maile nie będą wysyłane, dopóki nie połączysz jej ponownie albo nie uzupełnisz serwera SMTP.`,
mailRelayDisconnected: `Witryna jest rozłączona z ${IWSN}.`,
mailRelayDisconnectUnconfirmed: `Nie udało się połączyć z ${IWSN}, więc rozłączenie nie jest potwierdzone. E-maile nie są już wysyłane; kliknij Rozłącz ponownie później.`,
mailRelayForbidden: 'Tylko administrator może to zrobić.',
mailRelayHeading: 'Jak wysyłane są e-maile',
mailRelayLastFailure: 'E-mail nie został wysłany {{date}}. Kod: {{code}}.',
mailRelayLoadFailed: 'Nie udało się odczytać stanu. Spróbuj ponownie.',
mailRelayLoggedOut: 'Sesja wygasła. Zaloguj się ponownie.',
mailRelayNameReplaced: `${IWSN} nie przyjął nazwy nadawcy „{{asked}}”, więc e-maile wychodzą jako „{{used}}”. Wybierz inną nazwę poniżej.`,
@@ -145,14 +152,17 @@ export const integrationsTexts = defineTexts({
mailRelayRefusedHost: `Witryna nie ma jeszcze publicznego adresu ({{host}}). ${IWSN} zadziała, gdy witryna będzie dostępna pod swoją domeną.`,
mailRelayRefusedNoHost: 'Witryna nie zna własnego adresu. Zapytaj administratora.',
mailRelayRefusedOther: `${IWSN} odpowiedział: {{message}}`,
mailRelayRefusedSetup: `${IWSN} nie jest w pełni skonfigurowany w tej witrynie. Zapytaj administratora.`,
mailRelayRefusedToken: `Klucz dostępu tej witryny stracił ważność. Poproś administratora o nowy.`,
mailRelayRepliesTo: 'Odpowiedzi trafiają na adres {{address}}.',
mailRelaySmtpIncomplete: `Ustawienia SMTP poniżej są niepełne, więc e-maile idą przez ${IWSN}. Uzupełnij serwer, nazwę użytkownika i hasło albo je wyczyść.`,
mailRelayStateActive: `Połączono z ${IWSN}.`,
mailRelayStateDisconnected: 'Rozłączono. E-maile nie są wysyłane, dopóki nie połączysz witryny ponownie albo nie uzupełnisz serwera SMTP.',
mailRelayStateNotConnected: 'Jeszcze nie połączono. Witryna połączy się sama, gdy wyśle pierwszy e-mail.',
mailRelayStatePending: 'Witryna czeka na zatwierdzenie, więc e-maile nie są jeszcze wysyłane. Zapytaj administratora.',
mailRelayStateSuspended: 'Wysyłka e-maili z tej witryny została wstrzymana. Zapytaj administratora.',
mailRelayToken: 'Wpisz klucz dostępu',
mailRelayTokenForeign: 'Ten klucz dostępu należy do innej witryny, więc nie został zapisany. Poproś administratora o klucz dla tej witryny.',
mailRelayTokenHint: 'Tylko jeśli administrator przekazał Ci klucz dla tej witryny. Klucz zostanie zapisany i nie będzie więcej pokazywany.',
mailRelayTokenInvalid: `To nie jest klucz dostępu ${IWSN}.`,
mailRelayTokenSave: 'Zapisz klucz',