procrastinator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Procrastinator

type Procrastinator struct {
	// ConstantDelay added to all calls
	ConstantDelay time.Duration
	// RandomDelay can be used to decrease efficiency of timing attacks for bruteforcing passwords
	RandomDelay time.Duration
	// KarmaCoefficient makes things go faster when transaction karma is good
	KarmaCoefficient time.Duration
}

Procrastinator used to add random delays based on transaction karma - lower the karma, more the delays

func Default

func Default() Procrastinator

Default makes Procrastinator with sane default values

func (*Procrastinator) WaitForConnection

func (p *Procrastinator) WaitForConnection() msmtpd.ConnectionChecker

WaitForConnection should be called when you want client to train patience waiting when server will greet you

func (*Procrastinator) WaitForData

func (p *Procrastinator) WaitForData() msmtpd.DataChecker

WaitForData should be called when you want client to train waiting for DATA

func (*Procrastinator) WaitForHelo

func (p *Procrastinator) WaitForHelo() msmtpd.HelloChecker

WaitForHelo should be called when you want client to train patience waiting for HELO/EHLO

func (*Procrastinator) WaitForRecipient

func (p *Procrastinator) WaitForRecipient() msmtpd.RecipientChecker

WaitForRecipient should be called when you want client to train patience waiting for RCPT TO

func (*Procrastinator) WaitForSender

func (p *Procrastinator) WaitForSender() msmtpd.SenderChecker

WaitForSender should be called when you want client to train patience waiting for MAIL FROM

Jump to

Keyboard shortcuts

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