[Pymilter] addheader question
Sami-Pekka Hallikas
semi at hallikas.com
Fri May 19 13:30:46 EDT 2023
I had some issue with addheder, workaround is to use chgheader like
this:
self.chgheader("X-%s-Scanned" % (conf["name"]), 1,
time.strftime('%d.%m.%Y %H:%M:%S'))
---
Semi
Ed Wong kirjoitti 19.5.2023 13:03:
> Hi,
>
> I have the following code:
>
> if __name__ == "__main__": Milter.factory = SimpleMilter
> Milter.set_exception_policy(milter.CONTINUE)
> Milter.set_flags(Milter.CHGHDRS + Milter.ADDHDRS)
> sys.stdout.flush() Milter.runmilter("simplemilter",
> "/tmp/simpmilt.socket", 240)
>
> Given that, I should be able to add a header field/value to the
> headers, but when I do the following:
>
> def close(self):
> ... self.addheader("X-MARK", "Seen by SimpleMilter")
>
> I get an error:
>
> milter.error: cannot add header
>
> Now I'm wondering if I can't addheaders that late into the process.
> Is this the case?
>
> Any clarifications appreciated, thanks.
>
> Ed
> _______________________________________________
> Pymilter mailing list
> Pymilter at gathman.org
> https://gathman.org/mailman/listinfo/pymilter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gathman.org/pipermail/pymilter/attachments/20230519/8d663739/attachment.html>
More information about the Pymilter
mailing list