[Pymilter] custom reply text after quarantine?
Tom Hendrikx
tom at whyscream.net
Sun Jan 13 06:48:03 EST 2013
On 13-01-13 01:01, Stuart D Gathman wrote:
> On Jan 12, Tom Hendrikx transmitted in part:
>
>>>> Is there any way to accomplished the above?
>>> You cannot set a 5.7.1 extended status with a 250 status.
>>> If you still have problems, what callback are you doing the above in?
>>
>> I want to do this during eom()
>> Changing the esmtp code from 5.7.1. to 2.5.0 gives me the same error.
>
> It is the 250 that is the problem. Read the C API page:
>
> https://www.milter.org/developers/api/smfi_setreply
>
> rcode The three-digit (RFC 821/2821) SMTP reply code, as a
> null-terminated string. rcode cannot be NULL, and must be a valid 4XX or
> 5XX reply code.
>
> Here is an example of setreply in a production milter:
>
> def eom(self):
> if self.is_bounce and len(self.recipients) > 1:
> self.log("REJECT: DSN to multiple recipients")
> self.setreply('550','5.7.1', 'DSN to multiple recipients')
> return Milter.REJECT
> ...
I already use the 550 variant with succes, but I also wanted a custom
reply text for accepted messages, but I guess that's not possible
through the milter api. Thanks for the research :)
--
Tom
More information about the Pymilter
mailing list