On 6/19/23 22:05, Scott Kitterman via Postfix-users wrote:
On June 19, 2023 9:44:59 PM UTC, Viktor Dukhovni via Postfix-users 
<postfix-users@postfix.org> wrote:
On Mon, Jun 19, 2023 at 09:12:29PM +0000, Anton Hvornum via Postfix-users wrote:

Yea found libmilter, appears to have some python bindings too.
You don't need to go that far down the stack.  Try the "Milter" package.
There are sample Milters available, just tweak one to your needs.

For example:

    https://pythonhosted.org/pymilter/index.html
In fact, the spf-engine project that was mentioned up thread has a milter front 
end that uses pymilter, in addition to supporting the Postfix policy interface.

I'll also mention that there are multiple standardized ways to record SPF 
authentication results in the header of an email.  I would recommend using one 
of those, rather than inventing your own.
Agreed that sticking to existing and standardized headers would be optimal.

This was just for the learning experience while the production servers use traditional milters and policy services.

The headers were mostly an experiment to get the mail client of choice to honor the email as spam based on a set of headers, as it has a limited selection of trusted headers it parse and rely to mask mail as spam client-side.

//Anton

Attachment: OpenPGP_0x5FBBB32941E3740A.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to