Pitfalls

  • If any Milter in a list of Milters returns reject, none of the Milters that follow it will be given a chance to accept the message. This can make a multi-Milter design tricky.

  • The meaning of SMFI_VERSION changed with V8.14. Any Milter written before the change that gives the old value to the version part of the struct smfiDesc initialization structure (Milter smfi_register() on page 1194) may fail to run if that Milter links against a vendor’s older dynamic library. Note that this has been fixed as of V8.14.2 and a patch is available for V8.14.1:

    http://www.sendmail.org/patches/libmilter.8142.p0
  • The order in which Milters are called is defined by your sendmail configuration file. Be aware that changes in the configuration file can change the order in which Milters are called. This is important because, in the event that a Milter’s position changes, there is no way for that Milter to know it. Even if you set the order in the configuration file, neither assume it will remain in the correct order forever nor build that assumption into your Milter code.

  • If a Milter declares SMFIP_RCPT_REJ as part of xxfi_negotiate() (Milter xxfi_negotiate() on page 1220) with the intention of reviewing rejected recipients, it will not see recipients rejected by other Milters. This makes sense because otherwise, an already called Milter might have to be called again for a recipient if a later Milter rejected that recipient. Remember that SMFIP_RCPT_REJ only causes recipients rejected for non-syntactic ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.