Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] unusual log entries with milter-greylist 1.4

2004-07-15 by Cyril Guibourg

"Scot L. Harris" <webid@...> writes:

> I looked at the entries setup in sendmail.mc but do not see how to
> specify a timeout for the milter.  Emmanuel, can you point me to
> documentation or provide some additional hints?

Scot,


Parts of op.me should answer your questions:

   5.11.  X -- Mail Filter (Milter) Definitions

           The sendmail Mail Filter API (Milter) is designed
      to allow third-party programs access to mail  messages
      as  they  are being processed in order to filter meta-
      information and content.  They  are  declared  in  the
      configuration file as:

          Xname {, field=value}*

      where  name is the name of the filter (used internally
      only) and the "field=name" pairs define attributes  of
      the filter.  Also see the documentation for the Input-
      MailFilters option for more information.

           Fields are:

          Socket    The socket specification
          Flags     Special flags for this filter
          Timeouts  Timeouts for this filter

      Only the first character of the field name is  checked
      (it's case-sensitive).

           The  socket specification is one of the following
      forms:

          S=inet: port @ host
          S=inet6: port @ host
          S=local: path

      The first two describe an IPv4 or IPv6 socket  listen-
      ing  on  a certain port at a given host or IP address.

      The  final  form  describes  a  named  socket  on  the
      filesystem at the given path.

           The  following  flags  may  be  set in the filter
      description.

      R   Reject connection if filter unavailable.

      T   Temporary fail connection if filter unavailable.

           If neither F=R nor F=T is specified, the  message
      is passed through sendmail in case of filter errors as
      if the failing filters were not present.

           The timeouts can be set  using  the  four  fields
      inside of the T= equate:

      C   Timeout  for connecting to a filter.  If set to 0,
          the system's connect() timeout will be used.

      S   Timeout for sending information from the MTA to  a
          filter.

      R   Timeout for reading reply from the filter.

      E   Overall  timeout between sending end-of-message to
          filter and waiting for the final acknowledgment.

           Note the separator between each timeout field  is
      a   ';'.    The  default  values  (if  not  set)  are:
      T=C:5m;S:10s;R:10s;E:5m where s is seconds  and  m  is
      minutes.

           Examples:

          Xfilter1, S=local:/var/run/f1.sock, F=R
          Xfilter2, S=inet6:999@localhost, F=T, T=S:1s;R:1s;E:5m
          Xfilter3, S=inet:3333@localhost, T=C:2m


and from cf/README:

+-------------------------+
| ADDING NEW MAIL FILTERS |
+-------------------------+

Sendmail supports mail filters to filter incoming SMTP messages according
to the "Sendmail Mail Filter API" documentation.  These filters can be
configured in your mc file using the two commands:

        MAIL_FILTER(`name', `equates')
        INPUT_MAIL_FILTER(`name', `equates')

The first command, MAIL_FILTER(), simply defines a filter with the given
name and equates.  For example:

        MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')

This creates the equivalent sendmail.cf entry:

        Xarchive, S=local:/var/run/archivesock, F=R

The INPUT_MAIL_FILTER() command performs the same actions as MAIL_FILTER
but also populates the m4 variable `confINPUT_MAIL_FILTERS' with the name
of the filter such that the filter will actually be called by sendmail.

For example, the two commands:

        INPUT_MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')
        INPUT_MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T')

are equivalent to the three commands:

        MAIL_FILTER(`archive', `S=local:/var/run/archivesock, F=R')
        MAIL_FILTER(`spamcheck', `S=inet:2525@localhost, F=T')
        define(`confINPUT_MAIL_FILTERS', `archive, spamcheck')

In general, INPUT_MAIL_FILTER() should be used unless you need to define
more filters than you want to use for `confINPUT_MAIL_FILTERS'.

Note that setting `confINPUT_MAIL_FILTERS' after any INPUT_MAIL_FILTER()
commands will clear the list created by the prior INPUT_MAIL_FILTER()
commands.


With the hope it helps.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.