Documentation
¶
Overview ¶
Package relay forwards messages through an upstream SMTP server.
Two entry points:
- Probe — verify reachability + auth (used by the dialog's "Send test" button); doesn't actually send mail.
- Forward — relay a stored RFC822 source through the upstream to one or more recipients, applying optional From / Return-Path overrides.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseAddrs ¶
ParseAddrs is a small helper for callers that have a slice of recipient strings: returns the parsed mailboxes (drops malformed).
Types ¶
type Client ¶
type Client struct{}
func (*Client) Forward ¶
func (c *Client) Forward(ctx context.Context, conn *store.RelayConnection, m *store.Message, recipients []string, rewriteTo bool, ) error
Forward relays a stored message to `recipients` at the SMTP envelope level (RCPT TO) — delivery always goes to `recipients` regardless of the message headers. The message body is preserved verbatim except:
- conn.OverrideFrom (when set) rewrites the From: header, stashing the original under X-Original-From.
- conn.ReturnPath (when set) rewrites the SMTP envelope sender.
- rewriteTo (when true) rewrites the To: header to `recipients`, stashing the original under X-Original-To. Used by the manual "Release" action so the delivered copy reads as addressed to the person it was released to. Auto-relay passes false: it mirrors the message untouched, and rewriting To: to the envelope recipients would otherwise leak Bcc'd addresses into the visible To: header.
Click to show internal directories.
Click to hide internal directories.