Table of Contents

Method Create

Namespace
MailFathom.Infrastructure.Spam
Assembly
MailFathom.Infrastructure.dll

Create(string, int, TimeSpan, int, int)

Composes the profile a configured daemon is reached under.

public static SpamAssassinScannerProfile Create(string host, int port, TimeSpan scanTimeout, int maximumMessageBytes, int maximumConcurrentScans)

Parameters

host string

The daemon's host name or address.

port int

The TCP port it listens on.

scanTimeout TimeSpan

How long one exchange may take.

maximumMessageBytes int

The largest message that is sent at all.

maximumConcurrentScans int

How many exchanges may be in flight at once.

Returns

SpamAssassinScannerProfile

The validated profile.

Remarks

A bad host is refused rather than repaired, and the refusal quotes no part of it, for the reason src/AGENTS.md § Failures gives: this message reaches a startup log and a host name never does. What it names instead is the shape of a good value, which is what an operator with the file already open needs.

Exceptions

ArgumentException

Thrown when the host is blank or is neither a host name nor an IP address.

ArgumentOutOfRangeException

Thrown when the port is outside the TCP range, or a bound is not positive.