Sovite.Core.Repo.Tables.SenderRelays (sovite v0.2.0)

Copy Markdown View Source

Sender-dependent relaying, stored in Sovite's database and managed with sovitectl sender-relay: for a sender address or @domain, the relay host, the source address to connect from, and the credentials for the relay host.

As a Sovite.Core.Lookup table, the handle names the field a lookup returns: :relayhost, :source_address, or :credentials (username:password).

A field that is not set is "not found".

Summary

Functions

Deletes the entry for sender.

Lists all entries, by sender.

Sets fields (:relayhost, :source_address, :username, :password) for sender, creating its entry if needed. A nil value clears the field.

Functions

delete(repo, sender)

@spec delete(Sovite.Core.Repo.t(), String.t()) :: :ok | {:error, :not_found}

Deletes the entry for sender.

list(repo)

Lists all entries, by sender.

set(repo, sender, fields)

Sets fields (:relayhost, :source_address, :username, :password) for sender, creating its entry if needed. A nil value clears the field.