Documentation ¶
Overview ¶
Package mailproxy implements a POP/SMTP to Katzenpost proxy server.
Index ¶
- Variables
- type Proxy
- func (p *Proxy) GetRecipient(recipientID string) (*ecdh.PublicKey, error)
- func (p *Proxy) IsConnected(accountID string) bool
- func (p *Proxy) ListRecipients() map[string]*ecdh.PublicKey
- func (p *Proxy) ReceivePeek(accountID string) ([]byte, *ecdh.PublicKey, []byte, error)
- func (p *Proxy) ReceivePop(accountID string) ([]byte, *ecdh.PublicKey, []byte, error)
- func (p *Proxy) RemoveRecipient(recipientID string) error
- func (p *Proxy) SendMessage(senderID, recipientID string, payload []byte) error
- func (p *Proxy) SetRecipient(recipientID string, publicKey *ecdh.PublicKey) error
- func (p *Proxy) Shutdown()
- func (p *Proxy) Wait()
Constants ¶
This section is empty.
Variables ¶
var ( // ErrUnknownRecipient is the error that is returned when a recipient for // which there is no public key is specified. ErrUnknownRecipient = errors.New("mailproxy/api: unknown recipient, missing public key") // ErrNoMessages is the error that is returned when an account's receive // queue is empty. ErrNoMessages = errors.New("mailproxy/api: account receive queue empty") )
var ErrGenerateOnly = errors.New("mailproxy: GenerateOnly set")
ErrGenerateOnly is the error returned when the server initialization
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
Proxy is a mail proxy server instance.
func (*Proxy) GetRecipient ¶
GetRecipient returns the public key for the provided recipient.
func (*Proxy) IsConnected ¶
IsConnected returns true iff a connection to the provider is established.
func (*Proxy) ListRecipients ¶
ListRecipients returns a map of recipientIDs to public keys consisting of all currently known entries. Modifications to the returned map have no effect.
func (*Proxy) ReceivePeek ¶
ReceivePeek returns the eldest message in the given account's receive queue, the sender's public key if any, and a unique identifier tag. The account's receive queue is left intact.
func (*Proxy) ReceivePop ¶
ReceivePop removes and returns the eldest message in the given account's receive queue, the sender's public key if any, and a unique identifier tag.
func (*Proxy) RemoveRecipient ¶
RemoveRecipient removes the provided recipient. This has no impact on messages that have already been enqueued for transmission via SendMessage.
func (*Proxy) SendMessage ¶
SendMessage enqueues payload for transmission from the sender to the recipient (account IDs). The payload MUST be a well formed IMF message.
Any delivery failures after the message has been successfully enqueued will result in a delivery status notification message being sent from the postmaster to the senderID account.
func (*Proxy) SetRecipient ¶
SetRecipient sets the public key for the provided recipient.
Directories ¶
Path | Synopsis |
---|---|
Package config implements the configuration for the Katzenpost client mail proxy.
|
Package config implements the configuration for the Katzenpost client mail proxy. |
Package event implements the event types returned by the API's event listener.
|
Package event implements the event types returned by the API's event listener. |
internal
|
|
account
Package account implements the provider account backend.
|
Package account implements the provider account backend. |
authority
Package authority implements the generic PKI backend.
|
Package authority implements the generic PKI backend. |
glue
Package glue implements the internal interfaces used to glue the various mailproxy components together.
|
Package glue implements the internal interfaces used to glue the various mailproxy components together. |
imf
Package imf implements useful routines for dealing with the Internet Message Format as used by Katzenpost.
|
Package imf implements useful routines for dealing with the Internet Message Format as used by Katzenpost. |
pkiclient
Package pkiclient implements a caching wrapper around core/pki.Client.
|
Package pkiclient implements a caching wrapper around core/pki.Client. |
pop3
Package pop3 implements a minimal POP3 server, mostly intended to be ran over the loopback interface.
|
Package pop3 implements a minimal POP3 server, mostly intended to be ran over the loopback interface. |
proxy
Package proxy implements the support for an upstream (outgoing) proxy.
|
Package proxy implements the support for an upstream (outgoing) proxy. |
recipient
Package recipient implements the recipient public key store.
|
Package recipient implements the recipient public key store. |