![]() ![]() |
Only the first character in each key is recognized, so a succinct declaration such as the following can be used to change the port used by the daemon: O DaemonPortOptions=P=26,A=our-addr # Only listen for local mail on nonstandard port 26 The DaemonPortOptions option is not safe. If specified from the command line, it can cause sendmail to relinquish its special privileges. DaemonPortOptions=Addr=The Addr key specifies the address to use. The value is the name[15] or IP address of one of your network interfaces:
O DaemonPortOptions=Addr=128.32.204.25 # listen to our IP address only If the Addr= and its value are omitted, the default address becomes INADDR_ANY, which allows connections to any address on the local machine. Note that this Addr is most useful on multihomed (or multialiased interface) machines, although it can also be useful on single interface machines (such as listening for connections on the localhost, 127.0.0.1). Whenever sendmail calls rule sets to process a message, it puts the value of this DaemonPortOptions=Addr option into the ${daemon_addr} macro (${daemon_addr}). That macro is available for designing rule sets which make decisions based on the network address. (See also the ${client_addr) macro, ${client_addr}.) DaemonPortOptions=Family=The Family key is used to specify the network family. The legal possible values are inet for AF_INET, inet6 for AF_INET6, iso for AF_ISO, ns for AF_NS, and x.25 for AF_CCITT: O DaemonPortOptions=Family=iso Note that only inet, inet6, and iso are currently supported. The default is inet. Also note that inet requires NETINET to be defined, inet6 requires NETINET6 to be defined, and iso requires NETISO to be defined when sendmail is compiled (see NET...). Whenever sendmail calls rule sets to process a message, it puts the value of this DaemonPortOptions=Family option into the ${daemon_family} macro (${daemon_family}). That macro is available for designing rule sets which make decisions based on the address family. DaemonPortOptions=Listen=When sendmail begins to run in daemon mode, it executes a listen(2) system call as part of monitoring its SMTP port for incoming mail. The second argument to listen(2) defines the maximum length to which the incoming queue of pending connections can grow. If a connection request arrives with the queue full, the client will receive an error that indicates ECONNREFUSED. This Listen key is used to change the size of the incoming queue from its default of 10. If Listen is less than or equal to zero, listen(2) will silently set its own default. But note that some kernels might have built-in defaults of their own, so setting Listen might have no effect. DaemonPortOptions=Modify=Beginning with V8.10 sendmail, you can modify selected characteristics of the port. Modification is done by listing selected letters from Table 24-15 following the Modify=. Note that the letters are case-sensitive. Also note that of these letters, only h, S, and A are valid for the ClientPortOptions option.
In general, uppercase letters turn items on, while lowercase letters turn items off. Note that use of letters other than those shown will not yield an error. In fact, you can add your own letters and then use a ${daemon_flags} (${daemon_flags}) or ${client_flags} (${client_flags}) macro in your own custom rule sets to produce other interesting port-based decisions. One possibility might be to insist that any sender addresses arriving in the internal interface be fully qualified, and part of the local domain. DaemonPortOptions=Name=Because sendmail can listen on different ports simultaneously, and can bind to specific interfaces, it is desirable that each such instance be given a distinctive name. When listening on port 25 for inbound mail, sendmail is functioning as an MTA. When listening on port 587 for locally submitted mail, sendmail is functioning as an MSA. This DaemonPortOptions=Name= is used to set the name that will be reported with the daemon= syslog equate (daemon=), and that is placed into a ${daemon_name} (${daemon_name}) or ${client_name} ${client_name}) macro. Many errors in connections now produce error messages that include the expression: daemon name to help clarify which port and role ran into a problem. DaemonPortOptions=Port=The Port key is used to specify the service port on which the daemon should listen. This is normally the port called smtp, as defined in the /etc/services file. The value can be either a services string (such as smtp) or a number (such as 25). This key is useful inside domains that are protected by a firewall. By specifying a nonstandard port, the firewall can communicate in a more secure manner with the internal network while still accepting mail on the normal port from the outside world: O DaemonPortOptions=Port=26 If this pair is missing, the port defaults to smtp. As of V8.10, sendmail now also obeys RFC2476 and (by default) listens on port 587 for the local submission of mail (see FEATURE(no_default_msa)). The value of Port (port number) is placed into the ${daemon_port} macro (${daemon_port}) whenever rule sets are processed by that invocation of the daemon. For the ClientPortOptions option, the value of Port (port number) is placed into the ${client_port} macro whenever the client connects to another host. Note that for the ClientPortOptions option, this Port probably should be set because it limits outbound connections to one per IP address (because ports cannot be shared). DaemonPortOptions=ReceiveBufSize=The ReceiveSize key is used to specify the size of the TCP/IP receive buffer. The value is a size in bytes. This should not be set unless you are having performance problems. Slow links (such as 9.6K SL/IP lines) might profit from a setting of 256, for example: O DaemonPortOptions=ReceiveSize=256 The default value is set by the system (see setsockopt(2)). DaemonPortOptions=SendBufSize=The SendSize key is used to specify the size of the TCP/IP send buffer. The value is a size in bytes. This should not be set unless you are having performance problems. Slow links (such as 9.6K SL/IP lines) might profit from a setting of 256, for example: O DaemonPortOptions=SendSize=256 The default value is set by the system (see setsockopt(2)). ![]() |
![]() ![]() |