mod_email_relay
This module supports relaying email between Zotonic servers.
With is_email_relay enabled, this server forwards outbound email payloads to another Zotonic relay server at
email_relay_url. The two servers authenticate requests using shared secrets:
email_relay_send_secret for sending relay requests and email_relay_receive_secret for receiving relay requests.
The relay server sends delivery status updates back through webhook reports.
The optional is_user_relay mode relays inbound messages for local username@hostname addresses directly to user
mailbox addresses from identity/resource data. This user-relay mode is experimental and should not be relied on for
production mail flow.
Accepted Events
This module handles the following notifier callbacks:
observe_email_bounced: If the bounced email is a relayed email, then forward a delivery report usingz_db:q.observe_email_failed: If the failed email is a relayed email, then forward a delivery report usingz_string:sanitize_utf8.observe_email_received: Check if the recipient is a known user, if so redirect the received e-mail as-is to that user usingm_config:get_boolean.observe_email_send_encoded: Relay an email via another Zotonic server usingm_config:get_boolean.observe_email_sent: If the sent email is a relayed email, then forward a delivery report usingz_db:q.observe_email_status: Forward blocking/unblocking of email addresses to the relaying Zotonic server usingm_config:get_boolean.observe_tick_24h: Run daily cleanup of relay queues and stale relay status records.
See also