iredmail

package
v0.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// DomainDefaultSettings keep the defaut settings
	DomainDefaultSettings = "default_user_quota:2048"
)
View Source
const (
	// Version of iredmail-cli
	Version = "0.2.6"
)

Variables

View Source
var (
	// ErrIredMailVersionNotSupported ...
	ErrIredMailVersionNotSupported = errors.New("iredMail version is not supported")
)

Functions

func GetIredMailVersion added in v0.2.2

func GetIredMailVersion() (iredMailVersion, error)

GetIredMailVersion retrievs the iredMail version

func ReadInConfig added in v0.2.6

func ReadInConfig() error

func SetConfigFile added in v0.2.6

func SetConfigFile(path string)

Types

type Alias

type Alias struct {
	Address string
	Domain  string
	Active  bool
	Forwardings
}

Alias struct

type Aliases

type Aliases []Alias

Aliases ...

func (Aliases) FilterBy

func (aliases Aliases) FilterBy(filter string) Aliases

FilterBy is method that filters Aliases by a given string

type Domain

type Domain struct {
	Domain      string
	Description string
	Settings    string
	Aliases     DomainAliases
	Catchalls   Forwardings
}

Domain struct

type DomainAlias added in v0.2.2

type DomainAlias struct {
	Domain      string
	AliasDomain string
}

DomainAlias struct

type DomainAliases added in v0.2.2

type DomainAliases []DomainAlias

DomainAliases ...

func (DomainAliases) FilterBy added in v0.2.2

func (a DomainAliases) FilterBy(filter string) DomainAliases

type Domains

type Domains []Domain

Domains ...

func (Domains) FilterBy

func (d Domains) FilterBy(filter string) Domains

FilterBy is method that filters Domains by a given string

type Forwarding

type Forwarding struct {
	Address             string
	Domain              string
	Forwarding          string
	DestDomain          string
	Active              bool
	IsList              bool
	IsAlias             bool
	IsForwarding        bool
	IsCopyKeptInMailbox bool
}

Forwarding struct

type Forwardings

type Forwardings []Forwarding

Forwardings ...

func (Forwardings) FilterBy

func (forwardings Forwardings) FilterBy(filter string) Forwardings

FilterBy is method that filters Forwardings by a given string

type Mailbox added in v0.2.2

type Mailbox struct {
	Email          string
	Name           string
	Domain         string
	PasswordHash   string
	Quota          int
	MailDir        string
	MailboxAliases Forwardings
	Forwardings    Forwardings
}

Mailbox struct

type Mailboxes added in v0.2.2

type Mailboxes []Mailbox

Mailboxes ...

func (Mailboxes) FilterBy added in v0.2.2

func (mailboxes Mailboxes) FilterBy(filter string) Mailboxes

FilterBy is method that filters Mailboxes by a given string

type Server

type Server struct {
	DB   *sql.DB
	Data struct {
		Forwardings
	}
}

func New

func New() (*Server, error)

func (*Server) Alias added in v0.2.2

func (s *Server) Alias(aliasEmail string) (Alias, error)

Alias returns an Alias with its forwardings

func (*Server) AliasAdd

func (s *Server) AliasAdd(aliasEmail string) error

AliasAdd adds a new alias

func (*Server) AliasDelete added in v0.2.2

func (s *Server) AliasDelete(aliasEmail string) error

AliasDelete deletes an alias an its forwardings

func (*Server) AliasForwardingAdd added in v0.2.2

func (s *Server) AliasForwardingAdd(aliasEmail, forwardingEmail string) error

AliasForwardingAdd adds a new alias fowarding

func (*Server) AliasForwardingDelete added in v0.2.2

func (s *Server) AliasForwardingDelete(aliasEmail, forwardingEmail string) error

AliasForwardingDelete deletes an alias forwarding

func (*Server) Aliases added in v0.2.2

func (s *Server) Aliases() (Aliases, error)

Aliases returns all Aliases with its forwardings

func (*Server) Close

func (s *Server) Close()

func (*Server) Domain added in v0.2.2

func (s *Server) Domain(domainName string) (Domain, error)

Domain returns a Domain by its domain name

func (*Server) DomainAdd

func (s *Server) DomainAdd(domain Domain) error

DomainAdd adds a new domain

func (*Server) DomainAliasAdd added in v0.2.2

func (s *Server) DomainAliasAdd(aliasDomain, domain string) error

DomainAliasAdd adds a new domain alias

func (*Server) DomainAliasDelete added in v0.2.2

func (s *Server) DomainAliasDelete(aliasDomain string) error

DomainAliasDelete deletes a domain alias

func (*Server) DomainAliases added in v0.2.2

func (s *Server) DomainAliases() (DomainAliases, error)

DomainAliases returns all domainaliases

func (*Server) DomainCatchallAdd added in v0.2.2

func (s *Server) DomainCatchallAdd(domain, catchallEmail string) error

DomainCatchallAdd adds a new catchall mailbox

func (*Server) DomainCatchallDelete added in v0.2.2

func (s *Server) DomainCatchallDelete(domain, catchallEmail string) error

DomainCatchallDelete deletes a domain alias

func (*Server) DomainDelete added in v0.2.2

func (s *Server) DomainDelete(domain string) error

DomainDelete deletes a domain

func (*Server) Domains added in v0.2.2

func (s *Server) Domains() (Domains, error)

Domains returns all Domains

func (*Server) ForwardingAdd added in v0.2.2

func (s *Server) ForwardingAdd(mailboxEmail, destinationEmail string) error

ForwardingAdd adds a new Forwarding

func (*Server) ForwardingDelete added in v0.2.2

func (s *Server) ForwardingDelete(mailboxEmail, destinationEmail string) error

ForwardingDelete deletes a forwarding

func (*Server) Forwardings added in v0.2.2

func (s *Server) Forwardings() (Forwardings, error)

Forwardings returns all forwardings (actual forwardings, without mailbox copy)

func (*Server) Mailbox added in v0.2.2

func (s *Server) Mailbox(mailboxEmail string) (Mailbox, error)

Mailbox returns a Mailbox by mailboxEmail

func (*Server) MailboxAdd added in v0.2.2

func (s *Server) MailboxAdd(mailboxEmail, password string, quota int, storageBasePath string) error

MailboxAdd adds a new mailbox

func (*Server) MailboxAliasAdd added in v0.2.2

func (s *Server) MailboxAliasAdd(alias, mailboxEmail string) error

MailboxAliasAdd adds a new mailbox alias

func (*Server) MailboxAliasDelete added in v0.2.2

func (s *Server) MailboxAliasDelete(aliasEmail string) error

MailboxAliasDelete deletes a mailbox alias

func (*Server) MailboxAliasDeleteAll added in v0.2.2

func (s *Server) MailboxAliasDeleteAll(mailboxEmail string) error

MailboxAliasDeleteAll delets all mailbox aliases of a mailbox

func (*Server) MailboxDelete added in v0.2.2

func (s *Server) MailboxDelete(mailboxEmail string) error

MailboxDelete delets a mailbox

func (*Server) MailboxSetKeepCopy added in v0.2.2

func (s *Server) MailboxSetKeepCopy(mailboxEmail string, keepCopyInMailbox bool) error

MailboxSetKeepCopy sets the keep-copy behavior if forwardings exist

func (*Server) MailboxSetPassword added in v0.2.4

func (s *Server) MailboxSetPassword(mailboxEmail, password string) error

MailboxSetPassword set the password of a mailbox

func (*Server) MailboxSetQuota added in v0.2.2

func (s *Server) MailboxSetQuota(mailboxEmail string, quota int) error

MailboxSetQuota sets the mailbox quota

func (*Server) Mailboxes added in v0.2.2

func (s *Server) Mailboxes() (Mailboxes, error)

Mailboxes returns all mailboxes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL