API Reference
Detailed documentation of all classes, interfaces and methods of Zetian SMTP Server.
Quick Navigation
Core Classes
Namespace: Zetian.Server
SmtpServer
Main SMTP server class that handles connections and messages
Properties
ActiveSessionCountConfigurationStartTimeIsRunningEndpointMethods
StartAsync()StopAsync()Dispose()Events
SessionCompletedMessageReceivedSessionCreatedErrorOccurredSmtpServerBuilder
Fluent builder for configuring SMTP servers
Methods
Port(int)BindTo(IPAddress)BindTo(string)ServerName(string)MaxMessageSize(long)MaxMessageSizeMB(int)MaxRecipients(int)MaxConnections(int)MaxConnectionsPerIP(int)EnablePipelining(bool)Enable8BitMime(bool)EnableSmtpUtf8(bool)Certificate(X509Certificate2)Certificate(string path, string? password)CertificateFromPfx(string path, string? password, X509KeyStorageFlags flags)CertificateFromPem(string certPath, string? keyPath)CertificateFromCer(string path)SslProtocols(SslProtocols)RequireAuthentication(bool)RequireSecureConnection(bool)AllowPlainTextAuthentication(bool)AddAuthenticationMechanism(string)AuthenticationHandler(AuthenticationHandler)SimpleAuthentication(username, password)ConnectionTimeout(TimeSpan)CommandTimeout(TimeSpan)DataTimeout(TimeSpan)MaxRetryCount(int)LoggerFactory(ILoggerFactory)EnableVerboseLogging(bool)Banner(string)Greeting(string)BufferSize(readSize, writeSize)MessageStore(IMessageStore)WithFileMessageStore(directory, createDateFolders)MailboxFilter(IMailboxFilter)WithSenderDomainWhitelist(params string[])WithSenderDomainBlacklist(params string[])WithRecipientDomainWhitelist(params string[])WithRecipientDomainBlacklist(params string[])Build()CreateBasic()CreateSecure(X509Certificate2)CreateAuthenticated(int, AuthenticationHandler)Configuration
Namespace: Zetian.Configuration
SmtpServerConfiguration
Configuration settings for SMTP server
Properties
PortIpAddressServerNameMaxMessageSizeMaxRecipientsMaxConnectionsMaxConnectionsPerIpEnablePipeliningEnable8BitMimeEnableSmtpUtf8CertificateSslProtocolsRequireAuthenticationRequireSecureConnectionAllowPlainTextAuthenticationAuthenticationMechanismsConnectionTimeoutCommandTimeoutDataTimeoutMaxRetryCountReadBufferSizeWriteBufferSizeBannerGreetingLoggerFactoryEnableVerboseLoggingMessageStoreMailboxFilterMethods
Validate()Core Interfaces
Namespace: Zetian.Abstractions
ISmtpMessage
Represents an SMTP message
Properties
IdFrom (MailAddress?)Recipients (IReadOnlyList<MailAddress>)SubjectTextBodyHtmlBodyHeadersSizeDatePriorityHasAttachmentsAttachmentCountMethods
GetRawData()GetRawDataAsync()GetRawDataStream()GetHeader(string)GetHeaders(string)SaveToFile(string)SaveToFileAsync(string)SaveToStream(Stream)SaveToStreamAsync(Stream)ISmtpSession
Represents an SMTP session
Properties
IdRemoteEndPointLocalEndPointIsSecureIsAuthenticatedAuthenticatedIdentityClientDomainStartTimePropertiesClientCertificateMessageCountPipeliningEnabledEightBitMimeEnabledBinaryMimeEnabledMaxMessageSizeIMessageStore
Message storage interface
Methods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)IMailboxFilter
Mailbox filtering interface
Methods
CanAcceptFromAsync(ISmtpSession, string, long, CancellationToken)CanDeliverToAsync(ISmtpSession, string, string, CancellationToken)IStatisticsCollector
Interface for statistics collection
Properties
TotalSessionsTotalMessagesTotalErrorsTotalBytesMethods
RecordSession()RecordMessage(ISmtpMessage)RecordError(Exception)Authentication
Namespace: Zetian.Authentication & Zetian.Abstractions
IAuthenticator
Authentication mechanism interface (Zetian.Abstractions)
Properties
MechanismMethods
AuthenticateAsync(session, initialResponse, reader, writer, ct)AuthenticationResult
Authentication result (Zetian.Models)
Properties
SuccessIdentityErrorMessageMethods
Succeed(string identity)Fail(string? errorMessage)PlainAuthenticator
PLAIN mechanism authentication implementation
Properties
MechanismMethods
AuthenticateAsync(session, initialResponse, reader, writer, ct)LoginAuthenticator
LOGIN mechanism authentication implementation
Properties
MechanismMethods
AuthenticateAsync(session, initialResponse, reader, writer, ct)AuthenticatorFactory
Factory for creating authenticators
Methods
Create(mechanism)SetDefaultHandler(handler)GetDefaultHandler()ClearDefaultHandler()Storage
Namespace: Zetian.Storage
FileMessageStore
Saving messages to file system
Properties
DirectoryCreateDateFoldersMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)NullMessageStore
Null store that does not save messages
Methods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)BaseStorageConfiguration
Base configuration for all storage providers
Properties
MaxMessageSizeMBCompressMessageBodyCompressionThresholdKBEnableRetryMaxRetryAttemptsRetryDelayMsConnectionTimeoutSecondsLogErrorsLoggerMethods
Validate()Storage Providers
Namespace: Zetian.Storage.Providers
SqlServerMessageStore
SQL Server and Azure SQL Database storage provider
Properties
ConnectionStringConfigurationMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)SqlServerStorageConfiguration
Configuration for SQL Server storage
Properties
TableNameSchemaNameAutoCreateTableStoreAttachmentsSeparatelyAttachmentsTableNameCommandTimeoutSecondsBulkCopyBatchSizeMethods
Validate()GetFullTableName()GetAttachmentsTableName()PostgreSqlMessageStore
PostgreSQL storage provider with JSONB support
Properties
ConnectionStringConfigurationMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)PostgreSqlStorageConfiguration
Configuration for PostgreSQL storage
Properties
TableNameSchemaNameAutoCreateTableUseJsonbForHeadersEnablePartitioningPartitionIntervalCreateIndexesRetentionMonthsMethods
Validate()GetFullTableName()GetPartitionName(DateTime)MongoDbMessageStore
MongoDB NoSQL storage provider with GridFS support
Properties
ConnectionStringDatabaseNameConfigurationMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)MongoDbStorageConfiguration
Configuration for MongoDB storage
Properties
CollectionNameGridFsBucketNameUseGridFsForLargeMessagesGridFsThresholdMBAutoCreateIndexesEnableTTLTTLDaysShardKeyFieldMethods
Validate()ShouldUseGridFS(long sizeInBytes)RedisMessageStore
Redis in-memory cache storage provider
Properties
ConnectionStringConfigurationConnectionMultiplexerMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)RedisStorageConfiguration
Configuration for Redis storage
Properties
DatabaseNumberKeyPrefixMessageTTLSecondsUseChunkingChunkSizeKBUseCompressionEnablePubSubPubSubChannelUseStreamsStreamNameMethods
Validate()GetMessageKey(string messageId)GetChunkKey(string messageId, int chunkIndex)S3MessageStore
Amazon S3 and S3-compatible storage provider
Properties
AccessKeyIdSecretAccessKeyBucketNameConfigurationS3ClientMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)S3StorageConfiguration
Configuration for S3 storage
Properties
RegionServiceUrlKeyPrefixStorageClassEnableServerSideEncryptionKmsKeyIdEnableVersioningUseTransferAccelerationTransitionToIADaysTransitionToGlacierDaysForcePathStyleMethods
Validate()GetObjectKey(string messageId)GetS3Config()AzureBlobMessageStore
Azure Blob Storage provider with Azure AD support
Properties
ConnectionStringConfigurationBlobServiceClientContainerClientMethods
SaveAsync(ISmtpSession, ISmtpMessage, CancellationToken)AzureBlobStorageConfiguration
Configuration for Azure Blob storage
Properties
ContainerNameStorageAccountNameUseAzureAdAuthenticationAccessTierEnableSoftDeleteSoftDeleteRetentionDaysEnableVersioningUseHierarchicalNamespaceBlobPrefixMethods
Validate()GetBlobName(string messageId)GetServiceClient()Filtering
Namespace: Zetian.Storage
DomainMailboxFilter
Domain-based filtering
Properties
AllowedFromDomainsBlockedFromDomainsAllowedToDomainsBlockedToDomainsMethods
AllowFromDomains()BlockFromDomains()AllowToDomains()BlockToDomains()CompositeMailboxFilter
Combining multiple filters
Properties
ModeFiltersMethods
AddFilter()RemoveFilter()AcceptAllMailboxFilter
Filter that accepts all messages
Event Arguments
Namespace: Zetian.Models.EventArgs
MessageEventArgs
Event args for message events
Properties
MessageSessionCancelResponseSessionEventArgs
Event args for session events
Properties
SessionAuthenticationEventArgs
Event args for authentication events
Properties
MechanismUsernamePasswordSessionIsAuthenticatedAuthenticatedIdentityErrorEventArgs
Event args for error events
Properties
ExceptionSessionProtocol
Namespace: Zetian.Protocol
SmtpResponse
SMTP protocol response
Properties
CodeLinesMessageIsPositiveIsErrorIsSuccessMethods
ToString()Static Members
Ok (250)ServiceReady (220)ServiceClosing (221)StartMailInput (354)AuthenticationRequired (530)AuthenticationSuccessful (235)AuthenticationFailed (535)ServiceNotAvailable (421)SyntaxError (500)BadSequence (503)TransactionFailed (554)SmtpCommand
SMTP protocol command
Properties
NameParametersMethods
Parse(string)IsValid()Clustering
Namespace: Zetian.Clustering
IClusterManager
Main interface for cluster management and coordination
Properties
NodeIdClusterPortIsLeaderNodesStateMethods
EnableClusteringAsync(options)StartAsync()StopAsync()GetHealthAsync()GetMetrics()ReplicateStateAsync(key, data, options)GetReplicatedStateAsync<T>(key)MigrateSessionsAsync(fromNodeId)EnterMaintenanceModeAsync(options)ExitMaintenanceModeAsync()Events
NodeJoinedNodeLeftNodeFailedLeaderChangedStateChangedClusterOptions
Configuration options for clustering
Properties
NodeIdClusterPortBindAddressDiscoveryMethodSeedsReplicationFactorConsistencyLevelEnableEncryptionSharedSecretHeartbeatIntervalElectionTimeoutFailureDetectionTimeoutMethods
Validate()IClusterNode
Represents a node in the cluster
Properties
IdAddressPortStateIsLeaderCurrentLoadMaxLoadLastSeenMethods
GetHealthAsync()SendAsync(message)LoadBalancingStrategy
Enum for load balancing strategies
Values
RoundRobinLeastConnectionsWeightedRoundRobinIpHashNodeState
Enum for node states
Values
InitializingJoiningActiveMaintenanceDrainingFailedConsistencyLevel
Enum for read/write consistency levels
Values
OneTwoThreeQuorumAllDiscoveryMethod
Enum for node discovery methods
Values
StaticDNSMulticastKubernetesConsulEtcdExtensions
Namespace: Zetian.Extensions
SmtpServerExtensions
Extension methods for SMTP server
Methods
AddRateLimiting(IRateLimiter)AddRateLimiting(RateLimitConfiguration)AddMessageFilter(Func<ISmtpMessage, bool>)AddSpamFilter(string[] blacklistedDomains)AddSizeFilter(long maxSizeBytes)SaveMessagesToDirectory(string directory)LogMessages(ILogger logger)ForwardMessages(IMessageForwarder forwarder)AddRecipientValidation(Func<string, Task<bool>> validator)AddAllowedDomains(params string[] domains)AddStatistics(IStatisticsCollector collector)SmtpServerBuilderExtensions
Extension methods for SMTP server builder
Methods
WithRecipientDomainWhitelist(params string[] domains)WithRecipientDomainBlacklist(params string[] domains)StorageBuilderExtensions
Extension methods for storage providers
Methods
WithSqlServerStorage(string connectionString)WithSqlServerStorage(string connectionString, Action<SqlServerStorageConfiguration> configure)WithPostgreSqlStorage(string connectionString)WithPostgreSqlStorage(string connectionString, Action<PostgreSqlStorageConfiguration> configure)WithMongoDbStorage(string connectionString, string databaseName)WithMongoDbStorage(string connectionString, string databaseName, Action<MongoDbStorageConfiguration> configure)WithRedisStorage(string connectionString)WithRedisStorage(string connectionString, Action<RedisStorageConfiguration> configure)WithS3Storage(string accessKeyId, string secretAccessKey, string bucketName)WithS3Storage(string accessKeyId, string secretAccessKey, string bucketName, Action<S3StorageConfiguration> configure)WithS3CompatibleStorage(string serviceUrl, string accessKeyId, string secretAccessKey, string bucketName)WithS3CompatibleStorage(string serviceUrl, string accessKeyId, string secretAccessKey, string bucketName, Action<S3StorageConfiguration> configure)WithAzureBlobStorage(string connectionString)WithAzureBlobStorage(string connectionString, Action<AzureBlobStorageConfiguration> configure)WithAzureBlobStorageAD(string storageAccountName)WithAzureBlobStorageAD(string storageAccountName, Action<AzureBlobStorageConfiguration> configure)Rate Limiting
Namespace: Zetian.Models & Zetian.RateLimiting & Zetian.Abstractions
RateLimitConfiguration
Rate limiting configuration (Zetian.Models)
Properties
MaxRequestsWindowUseSlidingWindowMethods
PerMinute(int maxRequests)PerHour(int maxRequests)PerDay(int maxRequests)PerCustom(int maxRequests, TimeSpan window)IRateLimiter
Rate limiting interface (Zetian.Abstractions)
Methods
IsAllowedAsync(string key)IsAllowedAsync(IPAddress address)RecordRequestAsync(string key)RecordRequestAsync(IPAddress address)ResetAsync(string key)GetRemainingAsync(string key)InMemoryRateLimiter
In-memory implementation of rate limiter (Zetian.RateLimiting)
Properties
ConfigurationMethods
IsAllowedAsync(string key)IsAllowedAsync(IPAddress address)RecordRequestAsync(string key)RecordRequestAsync(IPAddress address)ResetAsync(string key)GetRemainingAsync(string key)CleanupExpiredWindows()Dispose()Delegates
Namespace: Zetian.Delegates
AuthenticationHandler
Delegate for handling authentication
Signature
Task<AuthenticationResult> AuthenticationHandler(string? username, string? password)Enums
Namespace: Zetian.Enums
CompositeMode
Composite filter mode for combining multiple filters
Values
All (AND logic)Any (OR logic)SmtpSessionState
SMTP session state enumeration
Values
ConnectedAwaitingCommandReceivingDataClosingPartitionInterval
PostgreSQL table partition interval for storage
Values
DailyWeeklyMonthlyYearlyBlobNamingFormat
Azure Blob Storage blob naming format options
Values
FlatDateHierarchyYearMonthDomainBasedBlobAccessTier
Azure Blob Storage access tier for cost optimization
Values
HotCoolArchiveHealth Check
Namespace: Zetian.HealthCheck
IHealthCheck
Interface for implementing health checks
Methods
CheckHealthAsync(CancellationToken)HealthCheckResult
Represents the result of a health check
Properties
StatusDescriptionExceptionDataMethods
Healthy(description?, data?)Degraded(description?, exception?, data?)Unhealthy(description?, exception?, data?)HealthCheckService
HTTP service for health check endpoints
Properties
OptionsIsRunningHttpListenerMethods
StartAsync(CancellationToken)StopAsync(CancellationToken)AddHealthCheck(name, check)AddHealthCheck(name, checkFunc)SmtpServerHealthCheck
Health check implementation for SMTP server
Properties
ServerOptionsMethods
CheckHealthAsync(CancellationToken)HealthCheckServiceOptions
Options for health check service
Properties
HostPortEndpointsTimeoutDetailedErrorsSmtpHealthCheckOptions
Options for SMTP server health check
Properties
DegradedThresholdUnhealthyThresholdMemoryThresholdMBCheckIntervalHealth Check Extensions
Namespace: Zetian.HealthCheck.Extensions
HealthCheckExtensions
Extension methods for adding health checks to SMTP server
Methods
EnableHealthCheck(port)EnableHealthCheck(hostname, port)EnableHealthCheck(IPAddress, port)EnableHealthCheck(options)StartWithHealthCheckAsync(port, ct)StartWithHealthCheckAsync(port, configureHealthChecks, ct)StartWithHealthCheckAsync(hostname, port, ct)StartWithHealthCheckAsync(hostname, port, configureHealthChecks, ct)StartWithHealthCheckAsync(IPAddress, port, ct)StartWithHealthCheckAsync(IPAddress, port, configureHealthChecks, ct)AddHealthCheck(healthCheckService, name, check)AddHealthCheck(healthCheckService, name, checkFunc)Health Check Enums
Namespace: Zetian.HealthCheck.Enums
HealthStatus
Health status enumeration
Values
Healthy (0)Degraded (1)Unhealthy (2)Relay Extension
Namespace: Zetian.Relay
RelayConfiguration
Configuration for relay service
Properties
DefaultSmartHostSmartHostsUseMxRoutingDomainRoutingMaxRetryCountMessageLifetimeConnectionTimeoutQueueProcessingIntervalCleanupIntervalMaxConcurrentDeliveriesEnableBounceMessagesBounceSenderLocalDomainsRelayDomainsRelayNetworksRequireAuthenticationEnableTlsRequireTlsSslProtocolsDnsServersSmartHostConfiguration
Smart host server configuration
Properties
HostPortPriorityWeightCredentialsUseTlsUseStartTlsSslProtocolsMaxConnectionsConnectionTimeoutRelayBuilder
Fluent builder for relay configuration
Methods
WithSmartHost(host, port, username, password)AddSmartHost(SmartHostConfiguration)MaxConcurrentDeliveries(int)MaxRetries(int)MessageLifetime(TimeSpan)ConnectionTimeout(TimeSpan)EnableTls(enable, require)LocalDomain(string)AddLocalDomains(params string[])AddRelayDomains(params string[])RequireAuthentication(bool)EnableBounce(enable, senderAddress)Build()RelayService
Background service for message relay
Properties
QueueConfigurationIsRunningMethods
StartAsync(CancellationToken)StopAsync(CancellationToken)QueueMessageAsync(RelayMessage)GetStatisticsAsync()IRelayQueue
Interface for relay queue implementation
Methods
EnqueueAsync(RelayMessage)DequeueAsync(CancellationToken)GetAllAsync()GetByStatusAsync(RelayStatus)UpdateAsync(RelayMessage)RemoveAsync(string)GetStatisticsAsync()ClearExpiredAsync()RelayMessage
Message in relay queue
Properties
IdMessageIdFromRecipientsDataPriorityStatusRetryCountNextRetryTimeCreatedTimeLastAttemptTimeSmartHostErrorRelay Enums
Namespace: Zetian.Relay.Enums
RelayPriority
Message priority levels
Values
Urgent (0)High (1)Normal (2)Low (3)RelayStatus
Relay message status
Values
QueuedInProgressDeliveredFailedDeferredExpiredCancelledPartiallyDeliveredAntiSpam Extension
Namespace: Zetian.AntiSpam
AntiSpamBuilder
Fluent builder for anti-spam configuration
Methods
EnableSpf(failScore)EnableDkim(failScore, strictMode)EnableDmarc(failScore, quarantineScore, enforcePolicy)EnableRbl(params string[])EnableBayesian(spamThreshold)EnableGreylisting(initialDelay)EnableEmailAuthentication(strictMode, enforcePolicy)AddChecker(ISpamChecker)WithDnsClient(IDnsClient)WithOptions(AntiSpamOptions)UseAggressive()UseLenient()Build()AntiSpamService
Main anti-spam service
Properties
CheckersOptionsStatisticsMethods
CheckMessageAsync(ISmtpMessage, ISmtpSession, CancellationToken)GetStatistics()ResetStatistics()EnableChecker(string)DisableChecker(string)ISpamChecker
Interface for spam checkers
Properties
NameIsEnabledMethods
CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)SpfChecker
SPF (Sender Policy Framework) checker
Properties
FailScoreDnsClientMethods
CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)DkimChecker
DKIM signature verification
Properties
FailScoreStrictModeDnsClientMethods
CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)DmarcChecker
DMARC policy enforcement
Properties
FailScoreQuarantineScoreEnforcePolicyDnsClientMethods
CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)RblChecker
RBL/DNSBL blacklist checker
Properties
ProvidersDnsClientMethods
CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)BayesianSpamFilter
Machine learning-based spam filter
Properties
SpamThresholdMinTokenLengthMaxTokenLengthMethods
TrainSpamAsync(string)TrainHamAsync(string)ClassifyAsync(string)GetStatistics()SaveModelAsync(string)LoadModelAsync(string)CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)GreylistingChecker
Greylisting implementation
Properties
InitialDelayAutoWhitelistAfterCleanupIntervalMethods
CheckAsync(ISmtpMessage, ISmtpSession, CancellationToken)Whitelist(string)RemoveWhitelist(string)ClearExpired()SpamCheckResult
Result of spam check
Properties
ScoreReasonIsSpamActionMethods
Spam(score, reason)Clean(score)TempFail(reason)Reject(reason)AntiSpam Models
Namespace: Zetian.AntiSpam.Models
AntiSpamOptions
Anti-spam configuration options
Properties
RejectThresholdTempFailThresholdRunChecksInParallelCheckerTimeoutContinueOnSpamDetectionEnableDetailedLoggingAntiSpamStatistics
Anti-spam statistics
Properties
MessagesCheckedMessagesBlockedMessagesPassedMessagesGreylistedSpfFailsDkimFailsDmarcFailsRblHitsBayesianSpamDetectedAverageScoreCheckerStatisticsRblProvider
RBL/DNSBL provider configuration
Properties
NameZoneExpectedResponsesScoreIsEnabledAntiSpam Enums
Namespace: Zetian.AntiSpam.Enums
SpamAction
Action to take for spam
Values
AcceptTempFailRejectDiscardQuarantineSpfResult
SPF check results
Values
PassFailSoftFailNeutralNoneTempErrorPermErrorDkimResult
DKIM check results
Values
PassFailNonePolicyNeutralTempErrorPermErrorDmarcResult
DMARC check results
Values
PassFailNoneTempErrorPermErrorDmarcPolicy
DMARC policy actions
Values
NoneQuarantineRejectMonitoring Extension
Namespace: Zetian.Monitoring
MonitoringConfiguration
Configuration for monitoring service
Properties
EnablePrometheusPrometheusPortPrometheusHostEnableOpenTelemetryOpenTelemetryEndpointUpdateIntervalEnableDetailedMetricsEnableCommandMetricsEnableThroughputMetricsEnableHistogramsServiceNameServiceVersionCustomLabelsCommandDurationBucketsMessageSizeBucketsMethods
Validate()MonitoringBuilder
Fluent builder for monitoring configuration
Methods
EnablePrometheus(port)EnablePrometheus(host, port)EnableOpenTelemetry(endpoint)WithServiceName(name)WithServiceVersion(version)EnableDetailedMetrics()EnableCommandMetrics()EnableThroughputMetrics()EnableHistograms()WithUpdateInterval(TimeSpan)WithLabels(params (string, string)[])WithCommandDurationBuckets(params double[])WithMessageSizeBuckets(params double[])Build()MetricsCollector
Metrics collection service
Properties
ConfigurationStatisticsMethods
RecordSession(ISmtpSession)RecordMessage(ISmtpMessage, bool)RecordCommand(command, success, durationMs)RecordAuthentication(success, mechanism)RecordConnection(accepted)RecordTlsUpgrade(success)RecordRejection(reason)RecordError(type)RecordBytes(direction, count)GetStatistics()ResetStatistics()ServerStatistics
Comprehensive server statistics
Properties
UptimeTotalSessionsActiveSessionsTotalMessagesReceivedTotalMessagesDeliveredTotalMessagesRejectedDeliveryRateRejectionRateTotalBytesReceivedTotalBytesSentTotalErrorsConnectionMetricsAuthenticationMetricsCommandMetricsCurrentThroughputMemoryUsagePeakMemoryUsageLastResetPrometheusExporter
Prometheus metrics exporter
Properties
PortHostMetricsUrlIsRunningMethods
StartAsync(CancellationToken)StopAsync(CancellationToken)UpdateMetrics(ServerStatistics)RegisterCustomMetric(name, help, type)OpenTelemetryExporter
OpenTelemetry tracing and metrics exporter
Properties
EndpointServiceNameServiceVersionMethods
StartAsync(CancellationToken)StopAsync(CancellationToken)ExportMetrics(ServerStatistics)CreateSpan(operationName)RecordEvent(name, attributes)Monitoring Models
Namespace: Zetian.Monitoring.Models
ConnectionMetrics
Connection-related metrics
Properties
TotalConnectionsReceivedAcceptedCountRejectedCountTlsUpgradesTlsUsageRateCurrentConnectionsPeakConcurrentConnectionsAverageConnectionDurationAuthenticationMetrics
Authentication-related metrics
Properties
TotalAttemptsSuccessCountFailureCountSuccessRateMechanismBreakdownUniqueUsersFailureReasonsCommandMetrics
SMTP command metrics
Properties
CommandTotalCountSuccessCountFailureCountSuccessRateAverageDurationMsMinDurationMsMaxDurationMsP95DurationMsP99DurationMsThroughputMetrics
Real-time throughput metrics
Properties
MessagesPerSecondBytesPerSecondCommandsPerSecondSessionsPerSecondAverageMessageSizePeakMessagesPerSecondPeakBytesPerSecond