cmdprocessor

package
v0.0.0-...-1fee6d4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2014 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package cmdprocessor provides a set of structs, variables and methods to process SMTP clients' commands.

Index

Constants

This section is empty.

Variables

View Source
var (
	//Contains commands and their relative functions (to be executed when a command is issued)
	Commands map[string]func(*Session, textual.Statement) Reply = map[string]func(*Session, textual.Statement) Reply{
		"auth":     auth.Process,
		"data":     data.Process,
		"ehlo":     ehlo.Process,
		"helo":     helo.Process,
		"mail":     mail.Process,
		"noop":     noop.Process,
		"quit":     quit.Process,
		"rcpt":     rcpt.Process,
		"rset":     rset.Process,
		"starttls": starttls.Process,
	}
)

Functions

This section is empty.

Types

type Processor

type Processor struct {
	Session     *Session //SMTP session, accessible by both the commands and the client handler
	LastCommand string   //The last successfully issued command
}

Struct to provide a throw-away command processor and session for SMTP.

func (*Processor) Process

func (p *Processor) Process(s string) string

Processes a SMTP command and returns a result.

Directories

Path Synopsis
Package auth implements SMTP authentication, such as PLAIN, LOGIN, and CRAM-MD5 SASL methods.
Package auth implements SMTP authentication, such as PLAIN, LOGIN, and CRAM-MD5 SASL methods.
Implements the DATA command.
Implements the DATA command.
Implements the EHLO command.
Implements the EHLO command.
Implements the HELO command.
Implements the HELO command.
Implements the MAIL command.
Implements the MAIL command.
Implements the NOOP command.
Implements the NOOP command.
Implements the QUIT command.
Implements the QUIT command.
Implements the RCPT command.
Implements the RCPT command.
Implements the RSET command.
Implements the RSET command.
Implements the STARTTLS command.
Implements the STARTTLS command.
Implements the VRFY command.
Implements the VRFY command.

Jump to

Keyboard shortcuts

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