[Pymilter] milter.error: cannot set reply
Stuart D. Gathman
stuart at bmsi.com
Thu Jun 11 12:50:21 EDT 2009
On Thu, 11 Jun 2009, Jay Deiman wrote:
> Now, on to the nasty stuff. I'm testing pymilter 0.9.2 out with the following
> install:
>
> FreeBSD 7.1-RELEASE-p2
> postfix 2.6.0 (installed from ports)
> pymilter 0.9.2 (installed from .tar.gz on sourceforge)
Good. I cannot test with postfix easily, as all my installs are sendmail.
I am working on srsmilter - which is something (some people in) the postfix
community wants, so finding out the differences from sendmail is good.
pymilter-0.9.2 is in production at 3 sendmail sites, one of which does
400K messages/day.
> the default, 6. All fail with the same error:
>
> 2009Jun05 14:59:46 [1] trying set reply
> Traceback (most recent call last):
> File "/usr/local/lib/python2.5/site-packages/Milter/__init__.py", line 327,
> in <lambda>
> milter.set_eom_callback(lambda ctx: ctx.getpriv().eom())
> File "./sample.py", line 133, in eom
> self.setreply(self.reply[0] , self.reply[1] , self.reply[2])
> File "/usr/local/lib/python2.5/site-packages/Milter/__init__.py", line 135,
> in setreply
> return self._ctx.setreply(rcode,xcode,msg,*ml)
> milter.error: cannot set reply
That error means that the smfi_setreply libmilter call returned MI_FAILURE:
(in miltermodule.c)
return _generic_return(smfi_setreply(ctx, rcode, xcode, message[0]),
"cannot set reply");
My first guess would be that postfix doesn't support setreply, but
that seems pretty basic to be missing. I notice that sample.py
as distributed comments out setreply. I wonder if that was from
previous testing with postfix. $%#$&* why didn't I note that in the
comments...
You mention:
> self.reply is a tuple containing:
> 0: '550'
> 1: ''
> 2: 'Die spammer die'
I wonder if postfix demands that you set xcode to something, like '5.7.1'.
The next question would be where did your libmilter come from?
P.S. Did you see the new docs I am working on? Take the pymilter link
from pymilter.sf.net.
--
Stuart D. Gathman <stuart at bmsi.com>
Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.
More information about the Pymilter
mailing list