Restricting inbound SMTP connections
To prevent your mail system from accepting unwanted mail, Domino® provides a set of controls that let you restrict incoming SMTP connections. The Inbound Connection controls let you specify whether Domino checks the names of connecting hosts in DNS or, if by host name or IP address, the remote hosts from which the server allows and denies connections.
About this task
To determine whether a connection attempt is allowed or denied, the Domino SMTP task first checks the remote host's IP address, which the server's TCP/IP stack reads from the incoming IP packet headers. If the IP address does not match any entry in the Inbound Connection control fields, the SMTP task performs a second check, querying DNS to obtain the host name for the given address. If the query is successful, Domino compares the name obtained against the host names in Allow and Deny fields.
If you create a separate Configuration Settings document for your internal SMTP servers, you can use the inbound connection controls to ensure that these internal servers accept SMTP connections from specific SMTP hosts only. For example, configure servers to allow SMTP connections only from servers that receive mail from the Internet. Restricting connections in this way prevents users with POP3 or IMAP clients from sending mail through the server, helps you define valid outbound routing paths, and limits the load on the server.
In addition to these inbound connection controls, Domino provides two other means for blocking connections:
- DNS blacklist filters
DNS blacklist filters enable a server to check a host against one or more blacklists during the SMTP conversation. If a connecting host matches an entry in a blacklist, you can configure the server to reject the connection, tag any received messages, or record the transaction in the Notes® Log.
- Access to the SMTP Listener through Domino Extension Manager (EM) services.
Extension Manager (EM) services allow developers to access some functions of the SMTP Listener task. The Extension Manager (EM) allows an executable program library, such as a dynamic link library or shared object library, to register a callback routine that will be called before, after, or before and after Domino performs selected internal operations. Using EM hooks in the SMTP Listener can extend current functionality by providing:
- Additional anti-spam controls
- Custom address translation
- Custom SMTP responses
- Interception of messages
The Domino C API header file EXTMGR.H, included in the Software Development Kit, defines symbols for the supported Extension Manager notification events and types.
For additional information on the Extension Manager and registering callback routines, see the Lotus® C API Toolkit for Notes/Domino, listed in the Additional documentation resources topic linked from the related references at the end of this topic.
To restrict inbound SMTP connection
Procedure
Restricting the total number of inbound SMTP sessions
About this task
By default, the SMTP service supports an unlimited number
of inbound sessions; that is, as many connections as the server's
resources physically permit. To restrict the number of concurrent
SMTP sessions that a server accepts, set the variable SMTPMaxSessions
in
the server's NOTES.INI file, where xxx is the
maximum number of sessions allowed without any buffering. When the
specified number of inbound SMTP connections is reached, the server
refuses additional connections and returns the following error:
421 Server.domain.com SMTP service not available, closing transmission channel