spamassassin

package
v1.14.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package spamassassin will return results from either a SpamAssassin server or Postmark's public API depending on configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ping

func Ping() error

Ping returns whether a service is active or not

func SetService

func SetService(s string)

SetService defines which service should be used.

func SetTimeout

func SetTimeout(t int)

SetTimeout defines the timeout

Types

type Result

type Result struct {
	// Whether the message is spam or not
	IsSpam bool
	// If populated will return an error string
	Error string
	// Total spam score based on triggered rules
	Score float64
	// Spam rules triggered
	Rules []Rule
}

Result is a SpamAssassin result

swagger:model SpamAssassinResponse

func Check

func Check(msg []byte) (Result, error)

Check will return a Result

type Rule

type Rule struct {
	// Spam rule score
	Score float64
	// SpamAssassin rule name
	Name string
	// SpamAssassin rule description
	Description string
}

Rule struct

Directories

Path Synopsis
Package postmark uses the free https://spamcheck.postmarkapp.com/ See https://spamcheck.postmarkapp.com/doc/ for more details.
Package postmark uses the free https://spamcheck.postmarkapp.com/ See https://spamcheck.postmarkapp.com/doc/ for more details.
Package spamc provides a client for the SpamAssassin spamd protocol.
Package spamc provides a client for the SpamAssassin spamd protocol.

Jump to

Keyboard shortcuts

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