iredmail

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DomainDefaultSettings = "default_user_quota:2048"
)

Variables

This section is empty.

Functions

func PrintAliases

func PrintAliases(aliases Aliases)

func PrintDomainInfo

func PrintDomainInfo(domainInfo DomainInfo)

func PrintDomains

func PrintDomains(domains Domains, quiet bool)

func PrintForwardings

func PrintForwardings(forwardings Forwardings)

Types

type Alias

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

type Aliases

type Aliases []Alias

func (Aliases) FilterBy

func (a Aliases) FilterBy(filter string) Aliases

type Domain

type Domain struct {
	Domain      string
	Description string
	Settings    string
}

type DomainInfo

type DomainInfo struct {
	Domain  Domain
	Users   Users
	Aliases Aliases
}

type Domains

type Domains []Domain

func (Domains) FilterBy

func (d Domains) FilterBy(filter string) Domains

type Forwarding

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

type Forwardings

type Forwardings []Forwarding

func (Forwardings) FilterBy

func (a Forwardings) FilterBy(filter string) Forwardings

func (Forwardings) GetByAddress

func (f Forwardings) GetByAddress(address string) Forwardings

type Server

type Server struct {
	DB *sql.DB
}

func New

func New() (*Server, error)

func (*Server) AliasAdd

func (s *Server) AliasAdd(email, destEmail string) error

func (*Server) AliasList

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

func (*Server) AliasRemove

func (s *Server) AliasRemove(email string) error

func (*Server) Close

func (s *Server) Close()

func (*Server) DomainAdd

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

func (*Server) DomainExists

func (s *Server) DomainExists(domain string) (bool, error)

func (*Server) DomainGet

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

func (*Server) DomainInfo

func (s *Server) DomainInfo(domainName string) error

func (*Server) DomainList

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

func (*Server) DomainUpdate

func (s *Server) DomainUpdate(d Domain) error

func (*Server) ForwardingList

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

func (*Server) UserAdd

func (s *Server) UserAdd(email, password string, quota int, storageBasePath string) (User, error)

func (*Server) UserAddAlias

func (s *Server) UserAddAlias(alias, email string) error

func (*Server) UserAddForwarding

func (s *Server) UserAddForwarding(userAddress, destinationAddress string) error

func (*Server) UserDelete

func (s *Server) UserDelete(email string) error

func (*Server) UserDeleteForwarding

func (s *Server) UserDeleteForwarding(userAddress, destinationAddress string) error

func (*Server) UserList

func (s *Server) UserList() (Users, error)

type User

type User struct {
	Email        string
	Name         string
	Domain       string
	PasswordHash string
	Quota        int
	Type         string
	MailDir      string
	UserAliases
	Forwardings
}

func (User) Print

func (m User) Print()

type UserAlias

type UserAlias struct {
	Address string
	User    string
}

type UserAliases

type UserAliases []UserAlias

type Users

type Users []User

func (Users) FilterBy

func (m Users) FilterBy(filter string) Users

func (Users) Print

func (mb Users) Print()

Jump to

Keyboard shortcuts

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