Skip to content
Snippets Groups Projects
Commit 25a02d9d authored by Stuart Gathman's avatar Stuart Gathman
Browse files

Disable negotiate callback when runtime version < 1,0,1

parent c20e82e3
No related branches found
No related tags found
No related merge requests found
...@@ -574,11 +574,15 @@ def runmilter(name,socketname,timeout = 0): ...@@ -574,11 +574,15 @@ def runmilter(name,socketname,timeout = 0):
milter.setconn(socketname) milter.setconn(socketname)
if timeout > 0: milter.settimeout(timeout) if timeout > 0: milter.settimeout(timeout)
# disable negotiate callback if runtime version < (1,0,1)
ncb = negotiate_callback
if milter.getversion() < (1,0,1):
ncb = None
# The name *must* match the X line in sendmail.cf (supposedly) # The name *must* match the X line in sendmail.cf (supposedly)
milter.register(name, milter.register(name,
data=lambda ctx: ctx.getpriv().data(), data=lambda ctx: ctx.getpriv().data(),
unknown=lambda ctx,cmd: ctx.getpriv().unknown(cmd), unknown=lambda ctx,cmd: ctx.getpriv().unknown(cmd),
negotiate=negotiate_callback negotiate=ncb
) )
start_seq = _seq start_seq = _seq
try: try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment