package
0.0.0-20221228155859-a7b1964828ec
Repository: https://github.com/toorop/tmail.git
Documentation: pkg.go.dev

# Functions

AddRoute add a new route.
AliasAdd create a new tmail alias.
AliasDel is used to delete an alias.
AliasExists checks if an alias exists.
AliasGet returns an alias.
AliasList return all alias.
AutoMigrateDB will keep tables reflecting structs.
Bootstrap DB, config,..
CRAMMD5Auth returns an Auth that implements the CRAM-MD5 authentication mechanism as defined in RFC 2195.
DelRoute delete a route.
DkimDisable Disable DKIM for domain domain by removing his DkimConfig entry.
DkimEnable enabled DKIM on domain.
DkimGetConfig returns DKIM config for domain domain.
ErrBadDsn when dsn is wrong.
GetAllRoutes returns all routes (really ?!).
GetDistPath returns basePath (where tmail binaries is).
getDsnsFromString Get dsn string from config and returns slice of dsn struct.
InitBolt init bolt.
InitConfig initialise config.
InitDB create tables if needed and initialize them TODO: SKIP in CLI TODO: check regularly structure & indexes.
remoteIpCanUseSmtp checks if an IP can relay.
IsInRcptHost checks if domain is in the RcptHost list (-> relay authorized).
IsIPV4 return true if ip is ipV4 todo: refactor.
IsOkDB checks if database is ok.
Check if a string is in a Slice of string TODO: replace by sort package.
IsValidLocalRcpt checks if rcpt is a valid local destination Mailbox (or wildcard) Alias catchall.
LaunchDeliverd launch deliverd.
MailboxAdd adds a new mailbox.
MailboxDel delete Mailbox TODO: supprimer tout ce qui est associé a cette boite.
MailboxExists checks if mailbox exist.
MailboxList return all mailboxes.
NewClamav returns a new clamac wrapper.
NewDiskStore returns a store with local disk as backend.
NewNSQLogger return a new NSQLogger.
NewSmtpd returns a new SmtpServer.
NewSMTPServerSession returns a new SMTP session.
NewStore return a new srore.
newUUID generates a random UUID according to RFC 4122.
PlainAuth returns an Auth that implements the PLAIN authentication mechanism as defined in RFC 4616.
QueueAddMessage add a new mail in queue.
QueueCount rerurn the number of message in queue.
QueueGetExpiredMessages return expired messages from DB.
QueueGetMessageById return a message from is key.
QueueListMessages return all messages in queue.
RcpthostAdd add hostname to rcpthosts.
RcpthostDel delete a hostname from rcpthosts list.
RcpthostGet return a rcpthost.
RcpthostGetAll return hostnames in rcpthosts.
RegisterDeliverdPlugin registers plugin for deliverd hooks.
RegisterPlugin registers a new plugin.
RegisterSMTPdPlugin registers a new smtpd plugin.
 relayipAdd authorize IP to relay through tmail.
RelayIpDel remove ip from authorized IP.
RelayIpList return all IPs authorized to relay through tmail.
RemoveBrackets removes trailing and ending brackets (<string> -> string).
StripQuotes remove trailing and ending ".
Unix2dos replace all line ending from \n to \r\n.
UserAdd add an user.
UserChangePassword is used to change user password.
UserDel delete an user.
UserExists checks if an user exists.
UserGet return an user by is login/passwd.
UserGetByLogin return an user from his login.
UserGetCatchallForDomain return catchall.
UserList return all user.

# Constants

CR is a Carriage Return.
LF is a Line Feed.
"02 Jan 06 15:04 -0700".

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DeliverdPlugins map of deliverd plugins.
ErrNonAsciiCharDetected when an email body does not contain only 7 bits ascii char.
Log *Logger.
No description provided by the author
SMTPdPlugins is a map of SMTPd plugins.
No description provided by the author
No description provided by the author
TmailPlugins is a map of plugin.
Version is tamil version.

# Structs

Alias represents a tmail alias.
Config represents tmail confiig when default is set to _ that means that the defauly value is (type)null (eg "" for string).
Delivery is a deliver process.
DkimConfig represents DKIM configuration for a domain.
No description provided by the author
No description provided by the author
NSQLogger is a logger for Nsq.
QMessage represents a message in queue.
RcptHost represents a hostname that tmail have to handle mails for (=local domains).
relayOkIp represents an IP that can use SMTP for relaying.
Route represents a route in DB.
ServerInfo records information about an SMTP server.
Smtpd SMTP Server.
SMTPServerSession retpresents a SMTP session (server).
User represents a tmail user.

# Interfaces

Auth is implemented by an SMTP authentication mechanism.
Storer is a interface for stores.

# Type aliases

DeliverdPlugin type for deliverd plugin.
SMTPdPlugin is the type for SMTPd plugins.
TmailPlugin base plugin for hooks: - postinit.