libmiter version

Rose, Bobby
Sun May 21 15:04:13 UTC 2006

I'm posting the question with Snertsoft also about this but here is what
they have in the changelog that explains what they are doing.  It does
sound like sendmail allows it because sendmail isn't really being

Added experimental code to implment milter specific SMTP
	commands using the libmilter xxfi_unknown handler. This
	requires BOTH sendmail and libmilter be built with

	specified in your devtools/Site/site.config.m4 file. This
	would allow for an administrator to get and/or remove
	individual cache entries without having to stop the milter.
   	Command processing is restricted only to hosts that have
   		milter-sender-command:ip	OK
   		milter-sender-command:hostname	OK
   	defined in the access.db. Also if you use FEATURE(`great_pause')
   	you will require either:
   		GreatPause:ip			0
   		GreatPause:hostname 		0
   	For example you should have this at a minimum:
   		milter-sender-command:	OK
   		GreetPause:		0
   	The extra SMTP commands are:
   		milter-sender cache-get $KEY
   		milter-sender cache-remove $KEY
   	Where $KEY is the cache key to get or remove. Due to design
	limitations in the libmilter API, a successful command is
	returned as 500 5.0.0 and unsuccessful command will be 500
	5.y.z and a textual response.
   	See contrib/ for an example shell script using
	nc(1) to provide a simple command line interface.


-----Original Message-----
From: [] On Behalf
Of Vernon Schryver
Sent: Friday, May 19, 2006 10:52 PM
Subject: Re: libmiter version

> From: "Rose, Bobby" <>

> In addition to using DCC as a sendmail milter, I also use Snertsoft's 
> milter-sender.  The current version of milter-sender requires that 
> sendmail and libmilter be compiled with APPENDDEF(`confENVDEF', 
> `-DSMFI_VERSION=4')'s default is "#define SMFI_VERSION 2" and no alternatives
are documented.  Changing that sort of undocumented thing can sometimes
be good and necessary, but it is often big mistake.  Note that I know
nothing about Snertsoft's milter-sender but what I've seen with a few
minutes of poking around on the web.

> To implment milter specific SMTP commands using the libmilter 
> xxfi_unknown handler.  The problem is that changing the sendmail 
> milter version definition breaks dccm which seems to require version 
> 2.  Is it possible for dccm to have a ifdef for version 4 without
breaking it?

What you should have done when starting to hack sendmail internals and
voilating the API (what you are doing whether you realize or admit it or
not), is to consult the sendmail source and documentation.  When I do
that, I see that mismatches of SMFI_VERSION values between the milter
and the MTA cause one or the other to give up.  This is all inside the
sendmail source, either MTA or libmilter.a, and outside the ken of the
milter itself.  That's probably why dccm does not work with your version
of sendmail and libmiter.a.

Dccm merely uses libmilter.a and doesn't know what SMFI_VERSION might
mean.  Dccm includes the standard block of code prescribed by the milter
documention.  You can see it with the hits of
Since dccm is not built as part of sendmail, APPENDDEF() has no effect.
dccm gets SMFI_VERSION from mfapi.h, sometimes
If you want dccm and other external milters to use SMFI_VERSION=4, you
will probably need to modify mfapi.h and then rebuild dccm and any other
external milters.

I have only one clue about how the result might work.  When and if the folks think SMFI_VERSION=4 is ready for prime time, I
assume they will change that line in mfapi.h or at least document

I don't think there's anything wrong with hacking sendmail internals,
provided you remember two things.  I've done it professionally.
The two things to remember are "If you break it, you own it" and
"Warranty void if seal is broken."

Vernon Schryver
DCC mailing list

More information about the DCC mailing list

Contact by mail or use the form.