Diagnostic aids for mail filter support

The debug message of a mail filter can be divided into two parts:

  • Milter API

    These messages are provided to allow programmers to develop a mail filter. These messages are written into the log file defined in filter program. The following section gives more detail of these messages.

  • Filter program
    The Milter API messages are mainly function error and input error. A function error means that a function call fails. It occurs when using an incompatible function or allocating invalid system resource, for example. These messages can be as follows:
                    :
    EZZ9963I filtername: malloc(size) failed for typestorage (ret reason) 
       strerror(ret) {abort | try again}"
    EZZ9971I filtername: pthread_create() failed (ret reason), strerror(ret)
                    :

These errors cannot be resolved easily. Report them to the program developer or the system administrator.

An input error means that a user has given an invalid parameter and caused the program to terminate. The mail filter reads socket type and port number from users.

Socket type has the following types:
  • inet4 (for IPv4)
  • inet6 (for IPv6)
  • UNIX domain socket
The following list describes the error operation and messages:
EZZ9951I SampleFilter: unknown socket type inet5
You gave an invalid socket type inet5. Select a valid socket type.
EZZ9961I filtername: Unable to bind (ret reason) to port stringI: strerror(ret)
The file path does not exist when using UNIX domain socket. Check that the file path exists before using UNIX domain socket.
EZZ9952I filtername: UNIX socket name string longer than max
A UNIX domain socket name cannot be defined over 108 characters in length. Rename A.B to less than 108 characters.
EZZ9955I SampleFilter: unknown port name abc
You gave an invalid port number.
EZZ9961 filtername: Unable to bind (ret reason) to port string: strerror(ret)
Do not give a port number that has been reserved, for example 21 (default for FTP). Obtain the reserved filter port number from the system administrator.
EZZ9965I SampleFilter: Unable to create listening socket on conn inet:21
Some error occurred when creating, binding, setting or listening a socket. Detailed error message should already be displayed before this message.
Sendmail daemon provides some information for connecting and talking to mail filters, you can change the log level defined in sendmail configuration file. The default log level is the same with sendmail log level:
O Milter.LogLevel=20

Check if the sendmail daemon works correctly with mail filters by log messages in sendmails's log file.

O Milter.LogLevel=20
Check if sendmail daemon works correctly with mail filters in the sendmail log file.

If mail is lost between the sendmail daemon and the filter program, see Packet trace (SYSTCPDA) for TCP/IP stacks to run a packet trace to determine where, and if, packets are being lost.