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
hoststringThe daemon's host name or address.
portintThe TCP port it listens on.
scanTimeoutTimeSpanHow long one exchange may take.
maximumMessageBytesintThe largest message that is sent at all.
maximumConcurrentScansintHow 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.