Skip to content

Commit

Permalink
add ref to post_final_validation hook
Browse files Browse the repository at this point in the history
  • Loading branch information
juliebin committed Nov 26, 2024
1 parent f954f86 commit aa06676
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions content/momentum/4/4-lua-summary-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ This section contains tables of Lua functions. Click the function name for detai
| [msys.unlock](/momentum/4/lua/ref-msys-unlock) – Releases a lock obtained via msys.lock | mutexname | msys | 4.0 | any |
| [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 |
| [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 |
| [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 |
| [msys.validate.openarc.verify](/momentum/4/lua/ref-msys-validate-openarc-verify) – Verify ARC sets | m | msys.validate.openarc | 5.0 | data_spool, data_spool_each_rcpt |
| [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 |
| [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 |
| [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 |
Expand Down
5 changes: 3 additions & 2 deletions content/momentum/4/hooks/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
lastUpdated: "10/05/2021"
title: "Category File"
lastUpdated: "11/26/2024"
title: "Hook Points and C Functions Reference"
type: "custom"
name: "Hook Points and C Functions Reference"
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..."
Expand All @@ -11,6 +11,7 @@ description: "This chapter includes hook point and C function reference material
|---------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------|
| [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 |
| [config_rsrc_setup](/momentum/4/hooks/config-rsrc-setup) | Register a resource |
| [core_post_final_validation](/momentum/4/hooks/core-post-final-validation) | Same usage as but invoked right after the `core_final_validation` hook |
| [ec_config_rsrc_get](/momentum/4/apis-ec-config-rsrc-get) | Return a resource list blobject from the configuration system |
| [ec_httpsrv_register_auth](/momentum/4/apis-ec-httpsrv-register-auth) | Register an HTTP handler for authenticating a URI |
| [ec_httpsrv_request_local_address](/momentum/4/apis-ec-httpsrv-request-local-address) | Returns the local IP address from the current session |
Expand Down
2 changes: 2 additions & 0 deletions content/momentum/4/lua/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ description: "This section details all Lua functions Functions are ordered alpha
| [msys.tls_params.set](/momentum/4/lua/ref-msys-tls-params-set) | Set a tls parameter string on a per connection basis |
| [msys.validate.dk.get_responsible_domain](/momentum/4/lua/ref-msys-validate-dk-get-responsible-domain) | Return the domain responsible for the current message |
| [msys.validate.dk.sign](/momentum/4/lua/ref-msys-validate-dk-sign) | Sign a message using a Domain Key |
| [msys.validate.opendarc.sign](/momentum/4/lua/ref-msys-validate-opendarc-sign) | Sign a message using OpenARC |
| [msys.validate.opendarc.verify](/momentum/4/lua/ref-msys-validate-opendarc-verify) | Verify ARC sets |
| [msys.validate.opendkim.get_num_sigs](/momentum/4/lua/ref-msys-validate-opendkim-get-num-sigs) | Return the number of DKIM signatures |
| [msys.validate.opendkim.get_sig](/momentum/4/lua/ref-msys-validate-opendkim-get-sig) | Get a signature from a DKIM object |
| [msys.validate.opendkim.get_sig_canons](/momentum/4/lua/ref-msys-validate-opendkim-get-sig-canons) | Fetch the canonicalizers used for a signature |
Expand Down
10 changes: 3 additions & 7 deletions content/momentum/4/modules/openarc.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,9 @@ openarc {}

The `msys.validate.opendarc.sign` does verification first. You should only invoke one of the APIs,
either `verify` or `sign` but not both.
It's recommended to invoke `msys.validate.opendarc.verify` in `validate_data_spool` hook.
It's recommended to invoke `msys.validate.opendarc.verify` in `validate_data_spool` or
[`validate_data_spool_each_rcpt`](/momentum/3/3-api/hooks-core-validate-data-spool-each-rcpt) hook.
`msys.validate.opendarc.sign` shall be invoked in the last validation phase, in
`post_final_validation` hook.

The `post_final_validation` hook is added as the absolute last point before writing the message into
spool. No any message modification expected after this stage. To avoid undefined race between
multiple implementations of the same hook, you shall only have up to one implementation for this
hook. And it's the best place to call `msys.validate.opendarc.sign`.
[`post_final_validation`](/momentum/4/hooks/core-post-final-validate) hook.

See API examples for hook usages.
1 change: 1 addition & 0 deletions content/momentum/4/modules/summary-all-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ All modules are listed alphabetically with a brief description. Singleton module
| [msgc_client](/momentum/4/modules/msgc) (*singleton*) | 4.0 | The client component of MSGC |   |  ✓ |   |   |
| [msgc_server](/momentum/4/modules/msgc) (*singleton*) | 4.0 | The server component of MSGC |   |  ✓ |   |   |
| [“mxip - IP Addresses In MX Records”](/momentum/4/modules/mxip) | 4.2 | Enable Momentum to deliver to domains with a textual IP address |   |   |   |   |
| [“opendarc – Open Source ARC”](/momentum/4/modules/opendarc) | 5.0 | Validate/sign mail using ARC |   |   |  ✓ |   |
| [“opendkim – Open Source DKIM”](/momentum/4/modules/opendkim) | 4.0 | Validate/sign mail using DKIM signatures |   |   |  ✓ |   |
| [“outbound_audit – Outbound traffic analytics”](/momentum/4/modules/outbound-audit) | 4.0 | Provides time-series analytics on the behavior of receiving domains |   |  ✓ |   |   |
| [“outbound_smtp_auth”](/momentum/4/modules/outbound-smtp-auth) | 4.2 | Enables users to specify authentication parameters for a given set of messages |   |   |   |   |
Expand Down

0 comments on commit aa06676

Please sign in to comment.