Skip to content

Commit 3008cd7

Browse files
TASK-3755: New release Momentum 5.0 (#785)
* EOP-281: OpenARC module and APIs (#782) * TASK-3755: Changelog for 5.0; updated EOL calendar Signed-off-by: Doug Koerich <[email protected]> --------- Signed-off-by: Doug Koerich <[email protected]> Co-authored-by: Julie Zhao <[email protected]>
1 parent f077390 commit 3008cd7

File tree

15 files changed

+542
-17
lines changed

15 files changed

+542
-17
lines changed

content/momentum/4/4-lua-summary-table.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastUpdated: "10/05/2021"
2+
lastUpdated: "03/01/2025"
33
title: "Lua Functions Summary"
44
description: "This section contains tables of Lua functions Click the function name for details Table 64 1 Lua functions all Function Description Params Package Version Phases ac esmtp capability add Add a capability to the EHLO response name msys extended ac 4 0 connect ehlo ac esmtp capability remove Removes a..."
55
---
@@ -174,6 +174,8 @@ This section contains tables of Lua functions. Click the function name for detai
174174
| [msys.unlock](/momentum/4/lua/ref-msys-unlock) – Releases a lock obtained via msys.lock | mutexname | msys | 4.0 | any |
175175
| [msys.validate.dk.get_responsible_domain](/momentum/4/lua/ref-msys-validate-dk-get-responsible-domain) – This function requires module "dk_validate". "msg" is a mail message. "ctx" is the validation context. It returns the responsible domain for the current message | msg, ctx | msys.validate.dk | 4.0 | data, data_spool, data_spool_each_rcpt |
176176
| [msys.validate.dk.sign](/momentum/4/lua/ref-msys-validate-dk-sign) – Sign a message using a Domain Key | msg, ctx, options | msys.validate.dk | 4.0 | core_data_validation |
177+
| [msys.validate.openarc.sign](/momentum/4/lua/ref-msys-validate-openarc-sign) – Sign a message using OpenARC | msg, options, [ar] | msys.validate.openarc | 5.0 | core_post_final_validation |
178+
| [msys.validate.openarc.verify](/momentum/4/lua/ref-msys-validate-openarc-verify) – Verify ARC sets | msg | msys.validate.openarc | 5.0 | data_spool, data_spool_each_rcpt |
177179
| [msys.validate.opendkim.get_num_sigs](/momentum/4/lua/ref-msys-validate-opendkim-get-num-sigs) – Return the number of DKIM signatures | dkim | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
178180
| [msys.validate.opendkim.get_sig](/momentum/4/lua/ref-msys-validate-opendkim-get-sig) – Get a signature from a DKIM object | dkim, [num] | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
179181
| [msys.validate.opendkim.get_sig_canons](/momentum/4/lua/ref-msys-validate-opendkim-get-sig-canons) – Fetch the canonicalizers used for a DKIM signature | dkim_sig | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
@@ -186,7 +188,7 @@ This section contains tables of Lua functions. Click the function name for detai
186188
| [msys.validate.opendkim.get_sig_selector](/momentum/4/lua/ref-msys-validate-opendkim-get-sig-selector) – Fetch the selector associated with a DKIM signature | dkim_sig | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
187189
| [msys.validate.opendkim.get_sig_signalg](/momentum/4/lua/ref-msys-validate-opendkim-get-sig-signalg) – Return the signing algorithm as a string | dkim_sig | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
188190
| [msys.validate.opendkim.sign](/momentum/4/lua/ref-msys-validate-opendkim-sign) – Sign a message using OpenDKIM | msg, vctx, [options] | msys.validate.opendkim | 4.0 | core_final_validation |
189-
| [msys.validate.opendkim.verify](/momentum/4/lua/ref-msys-validate-opendkim-verify) – Verify an DKIM signature | m | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
191+
| [msys.validate.opendkim.verify](/momentum/4/lua/ref-msys-validate-opendkim-verify) – Verify an DKIM signature | msg | msys.validate.opendkim | 4.0 | data, data_spool, data_spool_each_rcpt |
190192
| [sess:request_add_header](/momentum/4/lua/ref-sess-request-add-header) – Set the header of an HTTP session | header, value, replace | msys.httpclnt | 4.0 | http_request_eval |
191193
| [sess:request_delete_header](/momentum/4/lua/ref-sess-request-delete-header) – Delete a header from an HTTP session | header | msys.httpclnt | 4.0 | http_request_eval |
192194
| [sess:request_finalize](/momentum/4/lua/ref-sess-request-finalize) – Finalize changes to an HTTP request | update | msys.httpclnt | 4.0 | http_request_eval |

content/momentum/4/eol-policy.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastUpdated: '11/06/2024'
2+
lastUpdated: '03/01/2025'
33
title: 'End of Life Policy'
44
description: 'This document provides the latest version of the formal end-of-life policy for releases of software from Message Systems.'
55
---
@@ -43,8 +43,14 @@ Momentum version 4 became GA on April 15, 2014. Therefore:
4343
- Maintenance for all versions of Momentum 3 ended on December 31, 2018.
4444
- Support for all versions of Momentum 3 ended on December 31, 2018.
4545

46-
## MOMENTUM 4 GA DATES
46+
## MOMENTUM 4 END-OF-LIFE DATE
4747

48+
Momentum version 5 became GA on March 1, 2025. Therefore:
49+
50+
- Maintenance for all versions of Momentum 4 will end on March 1, 2026.
51+
- Support for all versions of Momentum 4 will end on March 1, 2027.
52+
53+
## MOMENTUM 4 AND MOMENTUM 5 GA DATES
4854

4955
| Update and Maintenance Versions | GA | End of Maintenance | End of Support |
5056
| ------------------------------- | ---------- | ------------------ | -------------- |
@@ -53,15 +59,16 @@ Momentum version 4 became GA on April 15, 2014. Therefore:
5359
| Momentum 4.2.x | 2015/8/3 | 2020/6/30 | 2021/6/30 |
5460
| Momentum 4.3.x | 2019/3/5 | 2022/9/3 | 2023/9/3 |
5561
| Momentum 4.4.x | 2021/9/3 | 2024/10/20¹ | 2024/12/31³ |
56-
| Momentum 4.5.0 | 2023/10/5 | 2024/12/19² | TBD |
62+
| Momentum 4.5.0 | 2023/10/5 | 2024/12/19² | 2027/3/1 |
5763
| Momentum 4.6.0 | 2023/10/20 | 2024/12/19 | 2024/12/31³ |
58-
| Momentum 4.7.0 | 2023/12/19 | 2025/10/17 | TBD |
59-
| Momentum 4.8.0 | 2024/10/17 | TBD | TBD |
64+
| Momentum 4.7.0 | 2023/12/19 | 2025/10/17 | 2027/3/1 |
65+
| Momentum 4.8.0 | 2024/10/17 | 2026/3/1 | 2027/3/1 |
66+
| **Momentum 5.0.0** | 2025/3/1 | TBD | TBD |
6067

6168
> ¹ Momentum 4.4.x was superseded by 4.6, which was the last version supporting CentOS 7.
6269
>
6370
> ² Momentum 4.5 was the first version supporting RHEL 8, and was superseded by 4.7.
6471
>
65-
> ³ Given the EOL of CentOS 7 operating system on June 30, 2024, all GA and Maintenance releases of Momentum 4 supporting that platform will be supported until **December 31, 2024**.
72+
> ³ Given the EOL of CentOS 7 operating system on June 30, 2024, maintenance and support for all GA and Maintenance releases of Momentum 4 supporting that platform ended on **December 31, 2024**.
6673
6774
[Previous version (December 10, 2012)](/momentum/4/eol-policy-2012).
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
---
2+
lastUpdated: "11/26/2024"
3+
title: "post_final_validation"
4+
description: "hook invoked after the normal final validation"
5+
---
6+
7+
<a name="hooks.core.post_final_validation"></a>
8+
## Name
9+
10+
post_final_validation — This hook is invoked after the normal
11+
[final_validation](/momentum/3/3-api/hooks-core-final-validation) hook
12+
13+
## Synopsis
14+
15+
`#include "hooks/core/final_validation.h"`
16+
17+
`int core_post_final_validation(void closure, ec_message *msg, accept_construct *ac, valiate_context *ctx)`
18+
19+
20+
## Description
21+
22+
This hook is invoked right after the
23+
[final_validation](/momentum/3/3-api/hooks-core-final-validation) hook. Its return value
24+
does not have significance for now.
25+
This hook is added as the absolute last point before writing the message to spool for delivery.
26+
It guarantees that operations implemented in this hook will happen after the operations done in
27+
`final_validation`.
28+
To avoid undefined ordering between multiple implementations of the same hook, you shall have at most
29+
one implementation for this hook.
30+
> It's the recommended hook point for ARC signing/sealing.
31+
32+
33+
**Parameters**
34+
35+
The parameters from this hook are the same as the ones for `final_validation` hook.
36+
37+
<dl class="variablelist">
38+
39+
<dt>closure</dt>
40+
41+
<dd>
42+
43+
A pointer to the closure function.
44+
45+
</dd>
46+
47+
<dt>msg</dt>
48+
49+
<dd>
50+
51+
A pointer to an ec_message struct. For documentation of this data structure see [“ec_message”](/momentum/3/3-api/structs-ec-message)
52+
53+
</dd>
54+
55+
<dt>ac</dt>
56+
57+
<dd>
58+
59+
The `accept_construct` struct. For documentation of this data structure see [“accept_construct”](/momentum/3/3-api/structs-accept-construct)
60+
61+
</dd>
62+
63+
<dt>ctx</dt>
64+
65+
<dd>
66+
67+
The `validate_context` struct. For documentation of this data structure see [“validate_context”](/momentum/3/3-api/structs-validate-context)
68+
69+
</dd>
70+
71+
</dl>
72+
73+
**Return Values**
74+
75+
This hook returns `int`, but for now the return value has no significance, i.e. it is not checked in
76+
the caller.
77+
78+
**Threading**
79+
80+
This hook will be called in any thread.
81+
82+
83+
<a name="idp45866720"></a>

content/momentum/4/hooks/index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
lastUpdated: "10/05/2021"
3-
title: "Category File"
2+
lastUpdated: "11/26/2024"
3+
title: "Hook Points and C Functions Reference"
44
type: "custom"
55
name: "Hook Points and C Functions Reference"
66
description: "This chapter includes hook point and C function reference material that is specific to Momentum 4 Hook points and C functions that are common to Momentum 4 and Momentum 3 are provided in the Momentum 3 x documentation For hook points see the C API For C functions see the..."
@@ -11,6 +11,7 @@ description: "This chapter includes hook point and C function reference material
1111
|---------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
1212
| [msg_gen_data_spool](/momentum/4/hooks/msg-gen-data-spool) | This hook is invoked after a message has been generated by the msg_gen module |
1313
| [config_rsrc_setup](/momentum/4/hooks/config-rsrc-setup) | Register a resource |
14+
| [core_post_final_validation](/momentum/4/hooks/core-post-final-validation) | Same usage as but invoked right after the `core_final_validation` hook |
1415
| [ec_config_rsrc_get](/momentum/4/apis-ec-config-rsrc-get) | Return a resource list blobject from the configuration system |
1516
| [ec_httpsrv_register_auth](/momentum/4/apis-ec-httpsrv-register-auth) | Register an HTTP handler for authenticating a URI |
1617
| [ec_httpsrv_request_local_address](/momentum/4/apis-ec-httpsrv-request-local-address) | Returns the local IP address from the current session |

content/momentum/4/lua/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
lastUpdated: "10/05/2021"
2+
lastUpdated: "03/01/2025"
33
title: "Category File"
44
type: "custom"
55
name: "Lua Functions Reference"
@@ -191,6 +191,8 @@ description: "This section details all Lua functions Functions are ordered alpha
191191
| [msys.tls_params.set](/momentum/4/lua/ref-msys-tls-params-set) | Set a tls parameter string on a per connection basis |
192192
| [msys.validate.dk.get_responsible_domain](/momentum/4/lua/ref-msys-validate-dk-get-responsible-domain) | Return the domain responsible for the current message |
193193
| [msys.validate.dk.sign](/momentum/4/lua/ref-msys-validate-dk-sign) | Sign a message using a Domain Key |
194+
| [msys.validate.openarc.sign](/momentum/4/lua/ref-msys-validate-openarc-sign) | Sign a message using OpenARC |
195+
| [msys.validate.openarc.verify](/momentum/4/lua/ref-msys-validate-openarc-verify) | Verify ARC sets |
194196
| [msys.validate.opendkim.get_num_sigs](/momentum/4/lua/ref-msys-validate-opendkim-get-num-sigs) | Return the number of DKIM signatures |
195197
| [msys.validate.opendkim.get_sig](/momentum/4/lua/ref-msys-validate-opendkim-get-sig) | Get a signature from a DKIM object |
196198
| [msys.validate.opendkim.get_sig_canons](/momentum/4/lua/ref-msys-validate-opendkim-get-sig-canons) | Fetch the canonicalizers used for a signature |
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
lastUpdated: "11/26/2024"
3+
title: "msys.validate.openarc.sign"
4+
description: "msys validate openarc sign seal add ARC set headers"
5+
---
6+
7+
<a name="lua.ref.msys.validate.openarc.sign"></a>
8+
## Name
9+
10+
msys.validate.openarc.sign — builds and adds the ARC set headers into an email.
11+
12+
msys.validate.openarc.seal - synonym of `msys.validation.openarc.sign`.
13+
14+
## Synopsis
15+
16+
`msys.validate.openarc.sign(msg, options, ar)`
17+
18+
`msys.validate.openarc.seal(msg, options, ar)`
19+
20+
```
21+
msg: userdata, ec_message type
22+
options: table
23+
ar: string, optional. It's the message's authentication assessment to be copied as-is into the AAR header.
24+
25+
```
26+
27+
## Description
28+
29+
This function acquires ARC chain status (i.e. `cv`) from `ec_message` context variable `arc_cv`. The `cv`
30+
will be used in the AS (ARC-Seal) header, and combined with authentication assessments from other
31+
methods (e.g. SPF, DKIM, etc) defined by the `ar` and put into the AAR (ARC-Authentication-Results)
32+
header. This function signs and seals the message by adding the AMS (ARC-Message-Signature) and AS
33+
(ARC-Seal) headers, using the signing mechanism defined in the `options` table.
34+
35+
If `ec_message` context variable `arc_cv` is not set when the function is called, the function will do an
36+
internal ARC validation (to set the `arc_cv`), followed by the regular `cv` based signing.
37+
38+
This function requires the [`openarc`](/momentum/4/modules/openarc) module.
39+
40+
Enable this function with the statement `require('msys.validate.openarc')`.
41+
42+
This function takes the following parameters:
43+
44+
* `msg` - mail message to sign
45+
46+
* `options` - table defines the options for signature generation/signing:
47+
48+
* `signing_domain` – signing domain
49+
50+
* `selector` – signing selector
51+
52+
* `authservid` – authentication service identifier, as
53+
[authserv-id](https://datatracker.ietf.org/doc/html/rfc8601#section-2.5) defined in RFC.
54+
55+
If not set, will be defaulted to the hostname.
56+
57+
* `header_canon` – header canonicalization setting.
58+
59+
Supported values are `relaxed`, `simple`. Defaults to `relaxed`.
60+
61+
* `body_canon` – body canonicalization setting
62+
63+
Supported values are `relaxed`, `simple`. Defaults to `relaxed`.
64+
65+
* `digest` – signing algorithm digest setting.
66+
67+
Supported values are `rsa-sha1` and `rsa-sha256`. Defaults to `rsa-sha256`.
68+
69+
* `keyfile` – signing key file
70+
71+
* `keybuf` – signing key
72+
73+
Must contain the PEM encoded private key to use for signing the
74+
message. This must be a contiguous string, with no line breaks and no white spaces, without the
75+
`BEGIN` and `END` tags that are found in the key file itself. The format is similar to the
76+
format used for OpenDKIM signing.
77+
78+
If not defined, will be built from the `keyfile`.
79+
80+
* `headerlist` – colon-separated list of headers to sign
81+
82+
* `oversign_headerlist` – colon-separated list of headers for over signing
83+
84+
* `skip_ar_header_update` – if set, no update to the AR (Authentication-Results) header.
85+
86+
If not set, Momentum will append the ARC verification result (e.g. `arc=pass`) to
87+
the existing AR header or create one if it does not exist.
88+
89+
* `ar` - authentication assessment to be copied as-is into the AAR (ARC-Authentication-Results) header.
90+
91+
If not provided, Momentum will take the value from the existing `Authentication-Results` header.
92+
Momentum appends this value with the ARC verification result (e.g. `arc=pass`) and uses it to
93+
build the AAR header.
94+
95+
96+
### Note
97+
98+
Since ARC sealing must not happen until all potential modification of a message is done, if you
99+
already have implementations in some other validation phases/hooks, this function
100+
should be invoked in the `post_final_validation` stage to guarantee that it is called
101+
after all the other hook implementations.
102+
103+
The function would cause the `ec_message` context variable `arc_seal` to be set:
104+
105+
`ok`: ARC signing/sealing is done, and ARC set headers are added.
106+
107+
`skip`: ARC signing/sealing is skipped, because the ARC chain already fails before reaching the
108+
current MTA.
109+
110+
If the context variable `arc_seal` of the `ec_message` is not set, it indicates an unexpected ARC
111+
signing/sealing failure, e.g. due to mis-configuration. The error reason is logged in paniclog.
112+
113+
114+
<a name="lua.ref.msys.validate.openarc.sign.example"></a>
115+
### Example
116+
117+
118+
```
119+
require("msys.core");
120+
require("msys.validate.openarc");
121+
local mod = {};
122+
123+
function mod:core_post_final_validation(msg, accept, vctx)
124+
local sealer = {}
125+
sealer.signing_domain = "sparkpost.com"
126+
sealer.selector = "dkim-s1024"
127+
sealer.keyfile = "path-to-keyfile"
128+
sealer.headerlist = "From:Subject:Date:To:MIME-Version:Content-Type"
129+
sealer.oversign_headerlist = "From:To:Subject"
130+
131+
msys.validate.openarc.sign(msg, sealer)
132+
133+
-- check sign/seal result
134+
local ok = msg:context_get(msys.core.ECMESS_CTX_MESS, "arc_seal")
135+
if ok == nil or ok == '' then
136+
print("ARC seal failed. No ARC set add! Check paniclog for reasons.")
137+
elseif ok == "skip" then
138+
print("ARC seal skipped. No ARC set add: ARC chain failed before reaching me.")
139+
else
140+
print("ARC seal ok. ARC set added!")
141+
end
142+
end
143+
144+
msys.registerModule("openarc_sign", mod);
145+
```
146+
147+
## See Also
148+
149+
[msys.validate.openarc.verify](/momentum/4/lua/ref-msys-validate-openarc-verify)
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
lastUpdated: "11/26/2024"
3+
title: "msys.validate.openarc.verify"
4+
description: "msys validate openarc verify Verify ARC sets headers"
5+
---
6+
7+
<a name="lua.ref.msys.validate.openarc.verify"></a>
8+
## Name
9+
10+
msys.validate.openarc.verify — Verifies ARC set headers in an email, and stores the verification results
11+
(`none/pass/fail`) into the email's context variable.
12+
13+
## Synopsis
14+
15+
`msys.validate.openarc.verify(msg)`
16+
17+
`msg: userdata, ec_message type`<a name="idp19138336"></a>
18+
## Description
19+
20+
This function validates the ARC set headers contained in the input message. The validation result
21+
will be stored as string value (`none` or `pass` or `fail`) in the `ec_message`'s context variable
22+
of `arc_cv`. A caller can take actions (e.g. disposition of the message) based on the validation
23+
result.
24+
25+
This function requires the [`openarc`](/momentum/4/modules/openarc) module.
26+
27+
Enable this function with the statement `require('msys.validate.openarc')`.
28+
29+
### Note
30+
31+
After being called, this function always sets the `ec_message` context variable `arc_cv` to one of
32+
the values: `none`, `pass`, `fail`. Unexpected `fail` cases are logged into paniclog.
33+
34+
This function invokes dns lookup for signature validation. It's recommended to invoke it from a hook
35+
which would not block Momentum's main tasks, e.g. from the `validate_data_spool` or the
36+
`validate_data_spool_each_rcpt` hook.
37+
38+
<a name="lua.ref.msys.validate.openarc.verify.example"></a>
39+
### Example
40+
41+
42+
```
43+
require("msys.core");
44+
require("msys.extended.message");
45+
require("msys.validate.openarc");
46+
local mod = {};
47+
48+
function mod:validate_data_spool_each_rcpt(msg, ac, vctx)
49+
msys.validate.openarc.verify(msg)
50+
local cv = msg:context_get(msys.core.ECMESS_CTX_MESS, "arc_cv")
51+
if cv then
52+
print("ARC validation result: ", cv)
53+
else
54+
print("Failed to do ARC validation. Check paniclog for reasons.")
55+
end
56+
end
57+
58+
msys.registerModule("openarc_verify", mod);
59+
```
60+
61+
## See Also
62+
63+
[msys.validate.openarc.sign](/momentum/4/lua/ref-msys-validate-openarc-sign)

0 commit comments

Comments
 (0)