Kai Sung wrote:
> Hi,
>
> I have two milters chained together. Is there a way for the second
> milter to detect that the first milter deleted an envelope recipient?
> I know I could do it by having the first milter add an X-header and the
> second milter can detect the added X-header, but unfortunately I don't
> have control over the first milter and it can't add X-headers. Any
> other creative ideas would be appreciated.
>
> Thanks,
> -Kai
If you have a milter that you dont control, you may want to look into
the milter-rrres patch.
http://www.jmaimon.com/sendmail
While the current posted version does not contain any post milter
action ruleset hooks, the version I have under development does,
untested as it may be. Perhaps you may want a crack at it. If you do,
let me know and I will send you an interim.
That may serve very well for you.
You could perhaps monitor syslog for the message logged by these lines
in sendmail/milter.c
if (MilterLogLevel > 8)
sm_syslog(LOG_INFO, e->e_id, "Milter delete: rcpt %s",
response);
You could also try modifying the functions called to update/set a macro
when this occurs.
More importantly, milters calls are done in order for every point of
the smtp phase.
You wont have one milter executing the xxfi_envrcpt callback after one
has already called a smfi_delrcpt() inside of the xxfi_eom callback.