ListenPort - slow.conf configuration item


The ListenPort slow.conf configuration item determines where and how the milter will listen for inbound connections from sendmail.

Note: You must configure sendmail to match this item.

If this ListenPort item must be declared (the default is inet:99@localhost which is likely not suitable for any host).

There are two ways to declare ListenPort: as a Unix-domain socket; or as a TCP/IP socket. The first is more suitable if you expect only the local host to contact the milter. The second is more suitable if you expect outside hosts (other hosts on your network) to contact the milter.

Unix-Domain Sockets

A Unix-domain socket is specified in the form: The prefix is one or the other of the unix or local keywords. That keyword is immediately followed by a colon, and then by the full pathname of the Unix-doman socket. Because the milter must not run as root, you need to locate that socket in a directory where the milter has write permission. The milter creates the socket file when it starts to run, and removes the socket file when it is done.

TCP/IP Sockets

A TCP/IP socket is specified in the form: The keyword inet is first, immediately followed fy a colon. Next is a port number to listen on, an '@' symbol, and finally either the name of a host or its IP number. The port should be above 1024 (because lower numbers can only be opened by root, and the milter never runs as root). The hostname is the host name associated with the interface upon which you intend the milter to listen. If you have multiple interfaces, this will select only one unless they all share a single name. In place of a host name, you may alternatively specify an IP number.

Sendmail Configuration

Whichever way you declare ListenPort, you will need to use the same declaration in your sendmail mc configuration file: Here (this single line may have wrapped to fit the window), we specify port 8765, which is otherwise unused on our system. The host.domain are those of our internal network interface. Your interface may differ, depending you your particular setup.

See the sendmail documentation for the meaning of the T= and other available milter flags.

Don't forget that if you are running more than one milter, you will need to list the order that they are called by listing them something like this:

The othermilter should be first, because it will detect spam that the slowmilt milter may miss, and thus will allow the slowmilt milter to record that fact if the MilterAbort configuration item is defined as true.