Class SendmailServer
- java.lang.Object
-
- com.aoindustries.aoserv.client.AOServObject<K,T>
-
- com.aoindustries.aoserv.client.CachedObject<Integer,V>
-
- com.aoindustries.aoserv.client.CachedObjectIntegerKey<SendmailServer>
-
- com.aoindustries.aoserv.client.email.SendmailServer
-
- All Implemented Interfaces:
Streamable,StreamReadable,StreamWritable,Row,AOServReadable,AOServStreamable,AOServWritable,SingleTableObject<Integer,SendmailServer>
public final class SendmailServer extends CachedObjectIntegerKey<SendmailServer>
AnSendmailServerrepresents one running instance of Sendmail.- Author:
- AO Industries, Inc.
- See Also:
SendmailBind
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ALLOW_PLAINTEXT_AUTHDefault value for sendmail_servers.allow_plaintext_authstatic intDEFAULT_BAD_RCPT_THROTTLEDefault value for sendmail_servers.bad_rcpt_throttlestatic intDEFAULT_CONNECTION_RATE_THROTTLEDefault value for sendmail_servers.connection_rate_throttlestatic intDEFAULT_DELAY_LADefault value for sendmail_servers.delay_lastatic intDEFAULT_MAX_DAEMON_CHILDRENDefault value for sendmail_servers.max_daemon_childrenstatic intDEFAULT_MAX_MESSAGE_SIZEDefault value for sendmail_servers.max_message_sizestatic intDEFAULT_MAX_QUEUE_CHILDRENDefault value for sendmail_servers.max_queue_childrenstatic intDEFAULT_MIN_FREE_BLOCKSDefault value for sendmail_servers.min_free_blocksstatic intDEFAULT_NICE_QUEUE_RUNDefault value for sendmail_servers.nice_queue_runstatic intDEFAULT_QUEUE_LADefault value for sendmail_servers.queue_lastatic intDEFAULT_REFUSE_LADefault value for sendmail_servers.refuse_la-
Fields inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
pkey
-
Fields inherited from class com.aoindustries.aoserv.client.CachedObject
table
-
Fields inherited from class com.aoindustries.aoserv.client.AOServObject
USE_ARRAY_OF_DOMAIN, USE_SQL_DATA, USE_SQL_DATA_WRITE
-
-
Constructor Summary
Constructors Constructor Description SendmailServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetAllowPlaintextAuth()Allows plaintext authentication (PLAIN/LOGIN) on non-TLS links.intgetAOServer_server_pkey()intgetBadRcptThrottle()The value forconfBAD_RCPT_THROTTLEor-1if not set.IpAddressgetClientAddrInet()TheAddrforClientPortOptionswithFamily=inetornullif not set.IntegergetClientAddrInet_id()IpAddressgetClientAddrInet6()TheAddrforClientPortOptionswithFamily=inet6ornullif not set.IntegergetClientAddrInet6_id()CertificategetClientCertificate()Gets the client certificate for this server.intgetClientCertificate_pkey()protected ObjectgetColumnImpl(int i)intgetConnectionRateThrottle()The value forconfCONNECTION_RATE_THROTTLEor-1if not set.intgetDelayLA()The value forconfDELAY_LAor-1if not set.DomainNamegetHostname()The fully qualified hostname forDw,Dm, andDj.intgetId()ServergetLinuxServer()intgetMaxDaemonChildren()The value forconfMAX_DAEMON_CHILDRENor-1if not set.intgetMaxMessageSize()The value forconfMAX_MESSAGE_SIZEor-1if not set.intgetMaxQueueChildren()The value forconfMAX_QUEUE_CHILDRENor-1if not set.intgetMinFreeBlocks()The value forconfMIN_FREE_BLOCKSor-1if not set.StringgetName()Gets the name of the sendmail server instance.intgetNiceQueueRun()The value forconfNICE_QUEUE_RUNor-1if not set.PackagegetPackage()intgetPackage_pkey()intgetQueueLA()The value forconfQUEUE_LAor-1if not set.intgetRefuseLA()The value forconfREFUSE_LAor-1if not set.List<SendmailBind>getSendmailBinds()CertificategetServerCertificate()Gets the server certificate for this server.intgetServerCertificate_pkey()StringgetSystemdEscapedName()Gets the systemd-encoded name of the sendmail server instance.Table.TableIDgetTableID()voidinit(ResultSet result)Initializes this object from the raw database contents.voidread(StreamableInput in, AoservProtocol.Version protocolVersion)StringtoStringImpl()AOServObject.toString()implementation that is allowed to throw exceptions.voidwrite(StreamableOutput out, AoservProtocol.Version protocolVersion)-
Methods inherited from class com.aoindustries.aoserv.client.CachedObjectIntegerKey
equals, getKey, getPkey, hashCode
-
Methods inherited from class com.aoindustries.aoserv.client.CachedObject
getTable, setTable
-
Methods inherited from class com.aoindustries.aoserv.client.AOServObject
compare, compare, compare, compare, compareIgnoreCaseConsistentWithEquals, compareTo, compareTo, compareTo, getAccountingCode, getColumn, getColumns, getColumns, getDomainLabel, getDomainLabels, getDomainName, getDto, getEmail, getGecos, getGroupId, getHashedKey, getHashedPassword, getHostname, getInetAddress, getLinuxID, getLinuxUserName, getMacAddress, getMySQLDatabaseName, getMySQLServerName, getMysqlUserName, getPort, getPostgresDatabaseName, getPostgresServerName, getPostgresUserId, getTableSchema, getTimeMillis, getTimeMillis, getUnixPath, getUserId, read, toString, write
-
-
-
-
Field Detail
-
DEFAULT_ALLOW_PLAINTEXT_AUTH
public static final boolean DEFAULT_ALLOW_PLAINTEXT_AUTH
Default value for sendmail_servers.allow_plaintext_auth- See Also:
- Constant Field Values
-
DEFAULT_MAX_QUEUE_CHILDREN
public static final int DEFAULT_MAX_QUEUE_CHILDREN
Default value for sendmail_servers.max_queue_children- See Also:
- Constant Field Values
-
DEFAULT_NICE_QUEUE_RUN
public static final int DEFAULT_NICE_QUEUE_RUN
Default value for sendmail_servers.nice_queue_run- See Also:
- Constant Field Values
-
DEFAULT_DELAY_LA
public static final int DEFAULT_DELAY_LA
Default value for sendmail_servers.delay_la- See Also:
- Constant Field Values
-
DEFAULT_QUEUE_LA
public static final int DEFAULT_QUEUE_LA
Default value for sendmail_servers.queue_la- See Also:
- Constant Field Values
-
DEFAULT_REFUSE_LA
public static final int DEFAULT_REFUSE_LA
Default value for sendmail_servers.refuse_la- See Also:
- Constant Field Values
-
DEFAULT_MAX_DAEMON_CHILDREN
public static final int DEFAULT_MAX_DAEMON_CHILDREN
Default value for sendmail_servers.max_daemon_children- See Also:
- Constant Field Values
-
DEFAULT_BAD_RCPT_THROTTLE
public static final int DEFAULT_BAD_RCPT_THROTTLE
Default value for sendmail_servers.bad_rcpt_throttle- See Also:
- Constant Field Values
-
DEFAULT_CONNECTION_RATE_THROTTLE
public static final int DEFAULT_CONNECTION_RATE_THROTTLE
Default value for sendmail_servers.connection_rate_throttle- See Also:
- Constant Field Values
-
DEFAULT_MAX_MESSAGE_SIZE
public static final int DEFAULT_MAX_MESSAGE_SIZE
Default value for sendmail_servers.max_message_size- See Also:
- Constant Field Values
-
DEFAULT_MIN_FREE_BLOCKS
public static final int DEFAULT_MIN_FREE_BLOCKS
Default value for sendmail_servers.min_free_blocks- See Also:
- Constant Field Values
-
-
Method Detail
-
toStringImpl
public String toStringImpl()
Description copied from class:AOServObjectAOServObject.toString()implementation that is allowed to throw exceptions.Implementation Note:
This default implementation callsAOServObject.toString()on the key (fromAOServObject.getKey()). When the key isnull, uses the default implementation fromObject.toString().- Overrides:
toStringImplin classCachedObjectIntegerKey<SendmailServer>
-
getColumnImpl
protected Object getColumnImpl(int i)
- Specified by:
getColumnImplin classAOServObject<Integer,SendmailServer>
-
getTableID
public Table.TableID getTableID()
- Specified by:
getTableIDin classAOServObject<Integer,SendmailServer>
-
init
public void init(ResultSet result) throws SQLException
Description copied from class:AOServObjectInitializes this object from the raw database contents.- Specified by:
initin classAOServObject<Integer,SendmailServer>- Parameters:
result- theResultSetcontaining the row to copy into this object- Throws:
SQLException
-
read
public void read(StreamableInput in, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
readin interfaceAOServReadable- Specified by:
readin interfaceAOServStreamable- Specified by:
readin classAOServObject<Integer,SendmailServer>- Throws:
IOException
-
write
public void write(StreamableOutput out, AoservProtocol.Version protocolVersion) throws IOException
- Specified by:
writein interfaceAOServStreamable- Specified by:
writein interfaceAOServWritable- Specified by:
writein classAOServObject<Integer,SendmailServer>- Throws:
IOException
-
getId
public int getId()
-
getAOServer_server_pkey
public int getAOServer_server_pkey()
-
getLinuxServer
public Server getLinuxServer() throws SQLException, IOException
- Throws:
SQLExceptionIOException
-
getName
public String getName()
Gets the name of the sendmail server instance. The default instance has a null name. Additional instances will have non-empty names. The name is unique per server, including only one default instance.- See Also:
getSystemdEscapedName()
-
getSystemdEscapedName
public String getSystemdEscapedName()
Gets the systemd-encoded name of the sendmail server instance. The default instance has a null name. Additional instances will have non-empty names. The name is unique per server, including only one default instance.- See Also:
getName(),SystemdUtil.encode(java.lang.String)
-
getPackage_pkey
public int getPackage_pkey()
-
getPackage
public Package getPackage() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
getHostname
public DomainName getHostname()
-
getServerCertificate_pkey
public int getServerCertificate_pkey()
-
getServerCertificate
public Certificate getServerCertificate() throws SQLException, IOException
Gets the server certificate for this server.- Returns:
- the server SSL certificate or
nullwhen filtered - Throws:
SQLExceptionIOException
-
getClientCertificate_pkey
public int getClientCertificate_pkey()
-
getClientCertificate
public Certificate getClientCertificate() throws SQLException, IOException
Gets the client certificate for this server.- Returns:
- the client SSL certificate or
nullwhen filtered - Throws:
SQLExceptionIOException
-
getAllowPlaintextAuth
public boolean getAllowPlaintextAuth()
Allows plaintext authentication (PLAIN/LOGIN) on non-TLS links. When enabled, removes "p" from AuthOptions.
-
getMaxQueueChildren
public int getMaxQueueChildren()
The value forconfMAX_QUEUE_CHILDRENor-1if not set.
-
getNiceQueueRun
public int getNiceQueueRun()
The value forconfNICE_QUEUE_RUNor-1if not set.
-
getDelayLA
public int getDelayLA()
The value forconfDELAY_LAor-1if not set.
-
getQueueLA
public int getQueueLA()
The value forconfQUEUE_LAor-1if not set.
-
getRefuseLA
public int getRefuseLA()
The value forconfREFUSE_LAor-1if not set.
-
getMaxDaemonChildren
public int getMaxDaemonChildren()
The value forconfMAX_DAEMON_CHILDRENor-1if not set.
-
getBadRcptThrottle
public int getBadRcptThrottle()
The value forconfBAD_RCPT_THROTTLEor-1if not set.
-
getConnectionRateThrottle
public int getConnectionRateThrottle()
The value forconfCONNECTION_RATE_THROTTLEor-1if not set.
-
getMaxMessageSize
public int getMaxMessageSize()
The value forconfMAX_MESSAGE_SIZEor-1if not set.
-
getMinFreeBlocks
public int getMinFreeBlocks()
The value forconfMIN_FREE_BLOCKSor-1if not set.
-
getClientAddrInet_id
public Integer getClientAddrInet_id()
-
getClientAddrInet
public IpAddress getClientAddrInet() throws IOException, SQLException
TheAddrforClientPortOptionswithFamily=inetornullif not set.- Throws:
IOExceptionSQLException
-
getClientAddrInet6_id
public Integer getClientAddrInet6_id()
-
getClientAddrInet6
public IpAddress getClientAddrInet6() throws IOException, SQLException
TheAddrforClientPortOptionswithFamily=inet6ornullif not set.- Throws:
IOExceptionSQLException
-
getSendmailBinds
public List<SendmailBind> getSendmailBinds() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
-